Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

121
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda