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

115
Visualizações
Retaining schema when unloading Snowflake table to s3 in parquet

My table on Snowflake contains a field created as INT and defaults to NUMBER(38,0) as Snowflake data type.

When I unload this table to s3 in parquet format with COPY command, I expect to retain the whole schema including the precision of this field. However, the resulting parquet has INT32 Decimal(precision=9, scale=0).

In Snowflake documentation, it is mentioned that

/* To retain the table schema in the output file, use a simple SELECT statement (e.g. SELECT * FROM cities). */

However, my query below does not keep the precision intact.

COPY INTO @staging.dl_stage/prediction/vehicle/export_date=20200226/file 
FROM (
    SELECT * FROM  snd_staging.PREDICTION.vehicle
)
  FILE_FORMAT=(type='parquet' COMPRESSION = AUTO)
  HEADER = TRUE
  OVERWRITE = TRUE
  SINGLE = False
  MAX_FILE_SIZE=256000000;

Is it possible to force keeping Snowflake data type precision intact?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I eventually solved this by running this:

alter session set ENABLE_UNLOAD_PHYSICAL_TYPE_OPTIMIZATION = false; 
over 4 years ago · Santiago Trujillo 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