Forum Discussion
7 Replies
- akidaveEmployee
If the expression library file contains data, it can be written as a JSON file also. Instead of writing
{ a: 1, b: 2 }
you could write
{ "a": 1, "b": 2 }
The second format is valid JSON and the JSON parser snap will be able to read the expression library file. If the expression library has functions, then it will not be valid JSON. One workaround would be to separate data into one expression library file and functions into another file. The validation can be performed on the first file. The overlay feature can be used to combine the two files into one during the pipeline execution.
- SupratimContributor III
@david.gaster
If you have access for that project you can upload /refer it from your pipeline. Click on upload option and select the project where you have .exp file.After file read you can try parse it by json parser.
- david_gasterNew Contributor
I think you have misunderstood my question. Let’s say you have a properties.expr file attached to a pipeline in a Project. For example, this is the path to the properties.expr file.
/Org/ProjectFolder/properties.exprBut I want to access this file from a pipeline in a different project that lives at /Org/DifferentProjectFolder/pipeline
Using a file reader to read the properties.expr file, it is not in JSON format, so a file reader to JSON parser will not work…
Refer here regarding expression library files: https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438110/Expression+Libraries
- siwadonEmployee
@david.gaster Have you tried using
../../ProjectFolder/properties.expr
?Or you could move the file into
shared
folder.