After splitting text into structured fields, the next advanced transformation is reshaping. Pivot and Unpivot do not just move values around; they change how the dataset can be modeled, filtered, summarized, and explained.Después de dividir texto en campos estructurados, la próxima transformación avanzada es cambiar la forma. Pivot y Unpivot no solo mueven valores; cambian cómo el dataset puede modelarse, filtrarse, resumirse y explicarse.
Months are columns.Los meses son columnas.
Column headers become values.Encabezados se vuelven valores.
Long tables are easier to analyze.Tablas largas son más fáciles de analizar.
Small transformation choices can change the meaning of the dataset.Pequeñas decisiones de transformación pueden cambiar el significado del dataset.
Turns category values into separate columns.Convierte valores de categoría en columnas.
PIVOT or CASE aggregation widens data.PIVOT o agregación con CASE ensancha datos.
Turns many columns into attribute/value rows.Convierte muchas columnas en filas atributo/valor.
UNPIVOT or UNION ALL normalizes columns.UNPIVOT o UNION ALL normaliza columnas.
Good for cross-tabs and visual summaries.Buenas para cruces y resúmenes visuales.
Pivoted outputs can feed reports.Resultados pivotados alimentan reportes.
Good for filtering, grouping, and modeling.Buenas para filtrar, agrupar y modelar.
Normalized structures support analytics.Estructuras normalizadas soportan análisis.
Jan, Feb, Mar as columns can block analysis.Ene, Feb, Mar como columnas pueden bloquear análisis.
Unpivot months into Month and Amount.Despivota meses en Month y Amount.
If multiple values map to one cell, aggregate.Si varios valores caen en una celda, agrega.
SUM/COUNT/MAX decides the cell value.SUM/COUNT/MAX decide el valor de celda.
Column headers become data values.Encabezados de columna se vuelven valores.
Column name becomes attribute; cell becomes value.Nombre de columna se vuelve atributo; celda se vuelve valor.
Aggregated cells may hide underlying rows.Celdas agregadas pueden ocultar filas originales.
PIVOT summarizes when needed.PIVOT resume cuando hace falta.
Each original row can become many rows.Cada fila original puede convertirse en muchas.
UNPIVOT multiplies row representation.UNPIVOT multiplica la representación de filas.
Column headers should become meaningful attributes.Encabezados deben volverse atributos significativos.
Alias names improve output clarity.Alias mejoran claridad del resultado.
Use Pivot to display; Unpivot to analyze.Usa Pivot para mostrar; Unpivot para analizar.
SQL can produce both shapes.SQL puede producir ambas formas.
The table shape affects relationships and measures.La forma afecta relaciones y medidas.
Schema design depends on grain.El diseño depende de la granularidad.