cancel
Showing results for 
Search instead for 
Did you mean: 

How to read file as input using SnapGPT from mention path in prompt.

nihit_g
New Contributor

Hi ,

I am using SnapGPT to read the file uploaded in the path "Project /snaplogictrial/projects/My Folder/xyz.csv" in the Sandbox environment.

However, SnapGPT is unable to read the file from the mentioned path.

Is this functionality already available or is there any other way that I can read the file via SnapGPT prompt ? Below is the prompt I am using.

Generate a pipeline to fetch "Global-Superstore.csv" file from path" Project /snaplogictrial/projects/My Folder", then filter it by removing all records except "India" as Country column, then load in the file writer.   

Thanks.

Nihit

3 REPLIES 3

RogerSramkoski
Employee
Employee

Hello @nihit_g, welcome to the Community! 👋

At this point in time, SnapGPT does not have much if any access to assets like files, accounts, or pipelines within an organization. That's an area we're moving forward on cautiously as we and many of our customers want us to be careful not to expose sensitive data or metadata. 

That said, I am curious if you could you share more about the error you see when trying to read the file? Is it a file not found error, or a insufficient permissions? What's the actual path that shows up in the File Reader? If we know more specifics about what you're seeing I can share that with the Product Management team. 

Hi rsramkoski

Thanks for the reply, I would like to elaborate the query regarding SnapGPT.

"Generate a pipeline to fetch "Global-Superstore.csv" file from path" Project /snaplogictrial/projects/My Folder", then filter it by removing all records except "India" as Country column, then load in the file writer."

I had used above prompt in SnapGPT and got pipeline generated and below are the things that came into picture.

  1. However, there is no error in the pipeline generation, Pipeline is somewhat correct as per my prompt used.
  2. Since CSV file is mentioned in the prompt, it is taking json parser and formatter as snap.
  3. In the pipeline, file reader snap should fetch the file which has been already uploaded to SLDB and its path and file name are also mentioned in the prompt.

     

    nihit_g_2-1691736842235.png

    But instead of fetching the file, it is simply taking that URL in the file reader snap which is mentioned in the prompt but not fetching the file like shown in the picture. 

     

    nihit_g_4-1691737491687.png
  4. SnapGPT doesn't validate itself once the pipeline it generates.

Thanks. 

Nihit

RogerSramkoski
Employee
Employee

Thank you @nihit_g! I will share this post with the SnapGPT Dev team as feedback.