Hi, I'm trying to automate the creation of a graph database through the use of the console.sh(.bat) for various environments we have.
I'd like to separate out the environment specific statements (such as connect, drop database, create database) from the sql statements that load the actual data. I'm hoping to perform a variable substitution (gradle/groovy based) on a small, generic/template sql file, and run it in combination with another sql file that loads the data. For example, I'd like to run something like this: > cd $ORIENTDB_HOME/bin > ./console.sh recreate-db.sql load-data.sql ...where the small "recreate-db.sql" file would have a few statements for connecting, dropping and creating a database. I would replace the environment specific information (database name, url, user, password, etc...) in the "recreate-db.sql". I want to somehow run the configured "recreate-db.sql" script with the unchanged "load-data.sql" in the same console session. Any idea how I can do this? It looks like only one .sql file may be passed into the console at a time. Other options could be - dynamically creating a string of sql that contains all my environment specific commands, followed by another command to essentially import the "load-data.sql" script - setting some environment variables that I could access from the sql script passed into the console. Thanks in advance for your help! I've been scouring this group, and the orientdb documentation, trying to find a solution that doesn't require me to make copies of large sql files when automating the configuration for our different environments. Regards, Andrew -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
