system
November 14, 2016, 1:39pm
1
Hi …
Wanted to know if I can use a Global Variable to point to a Remote/Local path in a File Location Object?
Tried the same - but it looks like the variables are not recognized (are not converted to the run time values).
Appreciate the help.
Thanks!
Aneesh
aneeshmenon (BOB member since 2016-11-09)
system
November 14, 2016, 7:55pm
2
It should work. I’ve used global variables to specify both the file location property and the file name property.
eganjp (BOB member since 2007-09-12)
system
November 15, 2016, 5:45pm
3
Thanks for the response Jim!
Doesn’t seem to be working for me! Not sure what’s missing.
Created a new File Location Object with protocol - FTP.
Host, user credentials - hard coded into the object.
Remote Directory - hard coded to a valid path on the Job Server.
Local Directory set to a global variable - $GV_DS_LOCAL_STG_PATH.
Simple Job with a script. Inside the script -
copy_from_remote_system('<FILE_LOCATION_OBJECT_NAME>', 'global_inventory_20151012_130943.csv');
This job fails with the error -
Cannot open file $GV_DS_LOCAL_STG_PATH/global_inventory_20151012_130943.csv> in write mode. Please check its path and permissions.
If I replace $GV_DS_LOCAL_STG_PATH with a hardcoded value - job runs fine.
Regards,
Aneesh
aneeshmenon (BOB member since 2016-11-09)
system
November 18, 2016, 12:48pm
4
I also tried using Substitution Parameters in the File Location object - but again get a similar error. Tried using a substitution parameter against both the remote path and local path - same results.
Any help is appreciated.
Thanks!
Aneesh
aneeshmenon (BOB member since 2016-11-09)
system
November 18, 2016, 3:09pm
5
This job fails with the error -
Cannot open file $GV_DS_LOCAL_STG_PATH/global_inventory_20151012_130943.csv> in write mode. Please check its path and permissions.
If I replace $GV_DS_LOCAL_STG_PATH with a hardcoded value - job runs fine.
That certainly isn’t going to work! What you need to do is create a parameter variable for the Dataflow. In the call to the Dataflow you will populate the parameter like this:
$GV_DS_LOCAL_STG_PATH || ‘global_inventory_20151012_130943.csv’
eganjp (BOB member since 2007-09-12)