Does TigerGraph allow the ability to use any sort of parameter when specifying a graph name to use, say, in a schema change job or a loading job?
For example, when creating a schema change job, we might specify something like
CREATE SCHEMA_CHANGE JOB schema_update_job FOR GRAPH dev {
...
}
This is great if you only have one graph named dev. What if we have several variants of the same graph–say for development (dev), quality assurance (qa), and prodution. Perhaps we even have a couple of developers or data scientists running side experiments who have their own editions (dev_miriam) and (ds_priyanka).
To script schema changes to all of those graphs, it looks like I now actually need five different copies of what are essentially the same script.
CREATE SCHEMA_CHANGE JOB schema_update_job FOR GRAPH dev {
...
}
CREATE SCHEMA_CHANGE JOB schema_update_job FOR GRAPH qa{
...
}
CREATE SCHEMA_CHANGE JOB schema_update_job FOR GRAPH prod {
...
}
CREATE SCHEMA_CHANGE JOB schema_update_job FOR GRAPH dev_miriam {
...
}
CREATE SCHEMA_CHANGE JOB schema_update_job FOR GRAPH ds_priayanka {
...
}
That is a lot to maintain.
What if I make a change to the script? Now, I have to update five different scripts and hope I don’t miss one.
Wouldn’t it be more convenient to be able to specify the graph name as a parameter like so?
CREATE SCHEMA_CHANGE JOB schema_update_job FOR GRAPH $graph_name {
...
}
Another feature that would be really helpful is the ability to include files in other GSQL scripts. Perhaps I have some kind of boilerplate code I want to add to many schema change or load jobs. It would be great to do something like the following.
CREATE SCHEMA_CHANGE JOB schema_update_job FOR GRAPH qa{
#include "/home/tigergraph/tigergraph/load-data/my_common_code.gsql"
}
Perhaps these features are already available and I am just missing them. If so, please correct my misunderstanding. If they are not available, then please consider as possible features for a future release.