Does TG support run cmd(Azure login) in Query?

inline string run_cmd(string cmd){
string data;
FILE * stream;

const int max_buffer = 512;
char buffer[max_buffer];

stream = popen(cmd.c_str(), "r");
if (stream){
    while (!feof(stream))
        if (fgets(buffer, max_buffer, stream) != NULL) data.append(buffer);
    pclose(stream);
}
return data;

}

CREATE QUERY test() FOR GRAPH Mockup {
PRINT run_cmd(“azcopy login --identity”);
}

@ryanwang Out of the box there isn’t a defined function to allow you to do this in your GSQL code. If you’re looking to lock down access on who can execute the GSQL query you can look into setting up security roles and then tie them to Azure.

Via GraphStudio:

1 Like