Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

119
Views
PUT command in SNOWFLAKE Stored Procedure

I try execute in * SnowSQL * v1.2.16

CREATE OR REPLACE PROCEDURE EDTIWKRSMWYJSYJYVFI0MQRM3K4BRQ06("start_week_id" FLOAT)
returns string
language javascript
execute as caller
as
$$
    snowflake.execute({sqlText: `PUT 'file://path_to_files' @named_stage;`});
    
    return "success";
$$;


CALL EDTIWKRSMWYJSYJYVFI0MQRM3K4BRQ06(1148);

The stored procedure works, but the data is not added to the Stage, executing the same code outside stored procedure loads data to stage. I found information in Snowflake documentation that PUT and GET command didnt work on java/scala stored procedures, but no information about javascript. enter image description here
link to docs: https://docs.snowflake.com/en/sql-reference/stored-procedures-java.html

QUESTION: how i can add data to stage with javascript stored procedure

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can’t. A stored procedure runs within Snowflake which has no access to your PC. A PUT command runs on your PC and uploads a file from your PC to Snowflake.

You would need to run 2 SnowSQL commands, one to PUT the file(s) and one to run a SP (or whatever you want to build) to process he staged file - assuming that’s what you want to do

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!