I have a bunch of .csv file and i was looking for the easiest way to load them into SnowPark? I am not sure which are the APIs required.
If someone can point me to the APIs or provide a code example that will be great.
Thanks
CodePudding user response:
I don't think you can do this directly in one step as Snowpark doesn't have an API for that. What you can do is:
Load the CSV files to a stage.
// Upload a file to a stage.
session.file.put("file:///tmp/file1.csv", "@myStage/prefix1")
Create a DataFrame by reading files from the stage.
val dfCatalog = session.read.csv("@myStage/prefix1")
