I m writing a q script that loads a db in a particular path and does some processing on it. The location of the db is currently hardcoded in the script, but I want to pass the db path as an argument and get it to load from the path in the variable.
Currently it looks like this:
q) l /path/to/dbDir #Works
I figured out that .Q.l should let us do this using a variable, so I tried using the following in the script,
dbPath:`$.z.x 0
.Q.l hsym dbPath #Fails
When running with argument /path/to/dbDir, the script always fails with some unreadable stuff and:
:/path/to/dbDir: No such file or directory
Could someone please help?