From 4ac62c79bff3c158af1b783d16cb10454e9ec742 Mon Sep 17 00:00:00 2001 From: Davi Cavalcante <93160711+DaviMacielCavalcante@users.noreply.github.com> Date: Thu, 8 Oct 2026 16:21:18 -0300 Subject: [PATCH] docs: nota sobre a flag jaggedrows em tabelas externas --- next/content/docs/en/style_data.md | 7 +++++++ next/content/docs/es/style_data.md | 7 +++++++ next/content/docs/pt/style_data.md | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/next/content/docs/en/style_data.md b/next/content/docs/en/style_data.md index 30403b4c..25496827 100644 --- a/next/content/docs/en/style_data.md +++ b/next/content/docs/en/style_data.md @@ -150,6 +150,13 @@ Fill in the `temporal_coverage` column in table, column, and key metadata (in di - Null value: `""` (csv), `NULL` (Python), `NA` (R) - Proportion/percentage: between 0-100 +## CSV files + +In every `.csv` file uploaded to staging, each row must have the same number of columns as the header. The staging table is created with the `allowJaggedRows` option turned off, in both dev and production. Because of this, BigQuery raises an error when it reads a row with missing columns, instead of filling them with nulls. + +- When creating the table with `tb.create`, do not pass `csv_allow_jagged_rows=True`. The package default is already `False`. +- When a new column is added to a table that already has files in staging, rewrite the old files with that column. Where there is no value, leave it empty (`""`), as with any null value. + ## Table partitioning ### **What is partitioning and what is its goal?** diff --git a/next/content/docs/es/style_data.md b/next/content/docs/es/style_data.md index c48246ed..a967be66 100644 --- a/next/content/docs/es/style_data.md +++ b/next/content/docs/es/style_data.md @@ -181,6 +181,13 @@ Llenar la columna `cobertura_temporal` en los metadatos de tabla, columna y clav - Valor nulo: `""` (csv), `NULL` (Python), `NA` (R) - Proporción/porcentaje: entre 0-100 +## Archivos CSV + +En todo archivo `.csv` que se sube a staging, cada fila debe tener el mismo número de columnas que el encabezado. La tabla de staging se crea con la opción `allowJaggedRows` desactivada, en dev y en producción. Por eso, BigQuery da error al leer una fila con columnas faltantes, en lugar de completarla con nulos. + +- Al crear la tabla con `tb.create`, no pases `csv_allow_jagged_rows=True`. El valor predeterminado del paquete ya es `False`. +- Cuando una columna nueva entre en una tabla que ya tiene archivos en staging, vuelve a escribir los archivos antiguos con esa columna. Donde no haya valor, déjala vacía (`""`), como cualquier valor nulo. + ## Particionamiento de tablas ### **¿Qué es el particionamiento y cuál es su objetivo?** diff --git a/next/content/docs/pt/style_data.md b/next/content/docs/pt/style_data.md index 1dab5383..82413dbf 100644 --- a/next/content/docs/pt/style_data.md +++ b/next/content/docs/pt/style_data.md @@ -196,6 +196,13 @@ Preencher a coluna `cobertura_temporal` nos metadados de tabela, coluna e chave - Valor nulo: `""` (csv), `NULL` (Python), `NA` (R) - Proporção/porcentagem: entre 0-100 +## Arquivos CSV + +Em todo arquivo `.csv` que sobe para a staging, cada linha deve ter o mesmo número de colunas do cabeçalho. A tabela de staging é criada com a opção `allowJaggedRows` desligada, em dev e em produção. Por isso, o BigQuery dá erro ao ler uma linha com colunas faltando, em vez de completá-la com nulos. + +- Ao criar a tabela com `tb.create`, não passe `csv_allow_jagged_rows=True`. O padrão do pacote já é `False`. +- Quando uma coluna nova entrar numa tabela que já tem arquivos na staging, regrave os arquivos antigos com essa coluna. Onde não houver valor, deixe-a vazia (`""`), como em qualquer valor nulo. + ## Particionamento de tabelas ### **O que é particionamento e qual seu objetivo ?**