Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

120
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda