I am trying to pass text file in python code to read but predix is not recognizing , giving error of "no file or directory" , how to pass it and where to keep that file.
Answer by Allen Chu · Jun 16, 2016 at 05:39 PM
Hi @Arihant,
If you include your data in the executable artifact you've uploaded to the Analytics Catalog service, your analytic will need to implement the logic to read that file itself. However, even if you do implement this functionality, this is not an ideal scenario, because if you want to run with a different input, you would have to re-deploy your analytic.
Instead, if you're running the analytic through the Analytics Catalog service, and you'd like to run with an input data file instead of including the input as the body of the request, you can do the following:
1) Use the Analytics Catalog service to upload the input data file as an artifact attached to your analytic
2) Use the Analytics Catalog Execution API to run your analytic, but provided as a query parameter "inputId={artifact_id}" This means your final execution endpoint would look like this:
{catalog_uri}/api/v1/catalog/analytics/{analytic_id}/execution?inputId={artifact_id}
This is outlined in the documentation here: https://www.predix.io/docs#qWaNn1MF under "Running an Analytic Synchronously Using the Analytics Catalog"
Triggering an Analytic 4 Answers
Issues with some analytics from catalog 3 Answers
analytics-ui url not working 7 Answers
Unable to re-upload analytic jar 2 Answers
How to connect data to an Analytics hosted in Analytics Catalog? 3 Answers