[BUG] `fab table schema` failure
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
Comienza con el comando fab table schema y sigue cómo enumera los archivos _delta_log/*.json conservados y extrae metaData.schemaString. Compara esa ruta con los archivos Parquet de checkpoint descritos en el issue y, después, verifica el comportamiento con una tabla cuyo JSON de metadatos se haya eliminado. Se considera terminado cuando el comando devuelve el esquema actual de esa tabla Delta válida en lugar de InvalidDeltaTable.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bug Description
Docs claim that fab table schema has full support for Lakehouse tables:
https://microsoft.github.io/fabric-cli/commands/tables/#:~:text=.-,Lakehouse,-(full%20support)
However, the table schema command can fail for a valid Delta table when the original Delta transaction-log JSON file containing the metaData action has already been removed by Delta log retention/checkpointing.
I have two tables in the same Lakehouse:
table_a—fab table schemaworks correctly.table_b—fab table schemareturnsInvalidDeltaTable.
Both tables are valid Delta tables and are accessible from Fabric/Spark.
The relevant difference appears to be their _delta_log history:
- The working table still contains the initial
00000000000000000000.jsonfile, which contains ametaDataobject withschemaStringobject inside. - The failing table has older JSON transaction logs removed and the currently retained JSON files start around version
00000000000000000260.json. None of the retained JSON files contain ametaDataobject. The older table state is represented through Delta checkpoint files.
Based on the current Fabric CLI implementation, fab table schema scans JSON files inside _delta_log and searches for a metaData.schemaString. It does not appear to reconstruct the Delta metadata from checkpoint Parquet files. As a result, a valid Delta table can incorrectly produce an InvalidDeltaTable error.
fabric-cli version
1.6.1
Python version
3.11.9
Operating System
Windows
CLI Mode
Command line mode
Authentication Method
Interactive browser login
Steps to Reproduce
- Create a Lakehouse containing a Delta table.
- Allow the table to accumulate enough Delta transaction history for older JSON log files containing the original
metaDataaction to be removed according to Delta log retention/checkpointing. - Verify that the table remains a valid Delta table and can be queried normally from Fabric/Spark.
- Verify that the remaining
_delta_log/*.jsonfiles do not contain ametaDataaction, while checkpoint files exist. - Run:
fab table schema testworkspace.Workspace/testlakehouse.Lakehouse/Tables/dbo/problem_table
The command returns:
[InvalidDeltaTable] Failed to extract the table schema. Please ensure the path points to a valid Delta table
For comparison, running the same command against another table in the same Lakehouse whose _delta_log still contains the original metadata JSON works correctly:
fab table schema testworkspace.Workspace/testlakehouse.Lakehouse/Tables/dbo/working_table
Expected Behavior
fab table schema should return the schema for any valid supported Delta table regardless of whether the original JSON transaction-log file containing the metaData action is still retained.
Delta tables remain valid after checkpointing and transaction-log retention, so schema extraction should work from the current Delta snapshot rather than depend on historical JSON files being present.
Actual Behavior
fab table schema returns:
[InvalidDeltaTable] Failed to extract the table schema. Please ensure the path points to a valid Delta table
even though the table itself is a valid Delta table.
The command succeeds for another table in the same Lakehouse where a retained _delta_log/*.json file still contains a metaData object.
Additional Context
Looking at the current fabric-cli implementation of table schema, the command appears to:
- Open
<table>/_delta_log. - Enumerate
.jsontransaction-log files. - Read those JSON files in reverse order.
- Search for a
metaDataaction. - Extract
metaData.schemaString. - Return
InvalidDeltaTableif no such JSON action is found.
This approach does not seem to account for Delta checkpoints.
In the failing table, the oldest retained JSON transaction-log file is approximately:
00000000000000000260.json
and none of the currently retained JSON files contain a metaData action.
The working table still has:
00000000000000000000.json
which contains the expected metaData.schemaString.
This makes the behavior dependent on Delta transaction-log retention/history rather than on whether the table is actually a valid Delta table.
Possible Solution
Instead of deriving the schema only by searching retained _delta_log/*.json files for a metaData action, fab table schema could reconstruct the current Delta snapshot, including metadata from checkpoint Parquet files.
Alternatively, the implementation could use a Delta-aware API/library or another Fabric metadata endpoint capable of returning the current table schema independently of transaction-log retention.
The InvalidDeltaTable error should also ideally be reserved for genuinely invalid/non-Delta tables. If schema extraction fails because the required metadata is unavailable through the current CLI implementation, a more specific error would make troubleshooting easier.
- Lenguaje dominante
- Python
- Estrellas
- 177
- Forks
- 65
- Merge medio
- 3 d 12 h
- PR fusionados (30 d)
- 8
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/fabric-cli
-
[BUG] bulk-export errors with "[NotSupported] Only supported for Lakehouse/Files"Quizá libre de nuevo @rksharma-owg la tomó hace 50 días y no hay ningún pull request abierto. Abiertoai:bug-triage:unable-to-process bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
microsoft/fabric-cli#287 · 2 comentarios ·
Los mantenedores suelen responder en 3 días
-
ai:feature-triage:unable-to-process enhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 64/100
microsoft/fabric-cli#292 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
ai:question-triage:unable-to-process question
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
microsoft/fabric-cli#288 · 2 comentarios ·
Los mantenedores suelen responder en 3 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
microsoft/fabric-cli#286 · 3 comentarios ·
Los mantenedores suelen responder en 3 días
-
ai:feature-triage:unable-to-process enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
microsoft/fabric-cli#279 · 1 comentario ·
Los mantenedores suelen responder en 3 días
Todos los issues de microsoft/fabric-cli
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
huggingface/smolagents#3106 ·
Los mantenedores suelen responder en 2 días
-
area:scripts area:tests bug priority:later
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Ikalus1988/MisakaNet#4358 ·
Los mantenedores suelen responder en 1 día
-
Discovered ports from service discovery are never propagated to modules in Module.load()Posiblemente ocupada @vishalmore90 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
OWASP/Nettacker#1828 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
aws-samples/sample-per-model-bedrock#708 ·
Los mantenedores suelen responder en 1 día
-
maintenance
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100