Predix_Logo
  • Categories
    • Questions
    • Predix | Updates
      • Pricing
      • Product
    • Deloitte - Private
    • How-To
    • Accenture-Private
  • Explore
    • Topics
    • Questions
    • Articles
    • Feedback or Feature Requests
  • Sign in
  • Home /
  • Questions /
avatar image
0
Question by Arihant · Jun 15, 2016 at 11:18 PM · analytics

How to pass data in text file to Python Analytics . Where we have to keep the text file in Analytic /driver /data folder ?

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.

Comment
Add comment
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

  • Sort: 
avatar image
1

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"

Comment
Add comment · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

36 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

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

GE Monogram
  • Legal
  • Cookies
  • Forum Terms
  • Contact Us
  • Copyright © 2017 General Electric Company. All rights reserved.


Enterprise
Social Q&A

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Submit your feedback or feature request
  • Categories
  • Questions
  • Predix | Updates
    • Pricing
    • Product
  • Deloitte - Private
  • How-To
  • Accenture-Private
  • Explore
  • Topics
  • Questions
  • Articles
  • Feedback or Feature Requests