-
Notifications
You must be signed in to change notification settings - Fork 49
fix: tables schema command replace manual _delta_log JSON parsing with DeltaTable.schema() from the deltalake library #229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pkontek
wants to merge
17
commits into
microsoft:main
Choose a base branch
from
SoletPL:tables_schema_fix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
c22f70e
fix: Add deltalake dependency and refactor schema extraction logic
pkontek c0dd71b
fix: Refactor `fab tables schema` to utilize `deltalake` library for …
pkontek f0327bc
fix: Correct typo in error constant for invalid Delta table
pkontek 746e8f6
Remove unused import
pkontek ca07e17
fix: Replace TableNotFoundError with DeltaError for schema extraction…
pkontek 0d18818
Merge branch 'tables_schema_fix' of https://github.com/SoletPL/fabric…
pkontek baaba5d
fix: Update schema extraction to use json.loads for DeltaTable schema
pkontek 8221723
Potential fix for pull request finding
pkontek 1012572
fix: Add unit tests for table schema command
pkontek 3963efa
fix: Add deltalake dependency to development requirements
pkontek 34c7141
rename test_tables to test_tables_schema
pkontek bce23dc
extract shared mock fixtures in test_tables_schema
pkontek a4c4ba7
combine delta error tests into parametrized test case
pkontek 55c3515
Potential fix for pull request finding
pkontek f206e12
feat: add integration tests for table schema command and mock API res…
pkontek 4cda700
fix: improve error handling in table schema extraction
pkontek c954a2a
fix: ensure access token is validated before schema extraction
pkontek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| kind: fixed | ||
| body: Refactor `fab tables schema` to use the `deltalake` Python library for schema extraction via ABFSS URI instead of manually parsing Delta log commit files | ||
| time: 2026-04-30T13:05:58.364670843Z | ||
| custom: | ||
| Author: pkontek | ||
| AuthorLink: https://github.com/pkontek |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
180 changes: 180 additions & 0 deletions
180
tests/test_commands/recordings/test_commands/test_tables_schema/class_setup.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,180 @@ | ||
| interactions: | ||
| - request: | ||
| body: null | ||
| headers: | ||
| Accept: | ||
| - '*/*' | ||
| Accept-Encoding: | ||
| - gzip, deflate | ||
| Connection: | ||
| - keep-alive | ||
| Content-Type: | ||
| - application/json | ||
| User-Agent: | ||
| - ms-fabric-cli-test/1.0.0 | ||
| method: GET | ||
| uri: https://api.fabric.microsoft.com/v1/workspaces | ||
| response: | ||
| body: | ||
| string: '{"value": [{"id": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName": | ||
| "My workspace", "description": "", "type": "Personal"}]}' | ||
| headers: | ||
| Content-Type: | ||
| - application/json; charset=utf-8 | ||
| status: | ||
| code: 200 | ||
| message: OK | ||
| - request: | ||
| body: null | ||
| headers: | ||
| Accept: | ||
| - '*/*' | ||
| Accept-Encoding: | ||
| - gzip, deflate | ||
| Connection: | ||
| - keep-alive | ||
| Content-Type: | ||
| - application/json | ||
| User-Agent: | ||
| - ms-fabric-cli-test/1.0.0 | ||
| method: GET | ||
| uri: https://api.fabric.microsoft.com/v1/workspaces | ||
| response: | ||
| body: | ||
| string: '{"value": [{"id": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName": | ||
| "My workspace", "description": "", "type": "Personal"}]}' | ||
| headers: | ||
| Content-Type: | ||
| - application/json; charset=utf-8 | ||
| status: | ||
| code: 200 | ||
| message: OK | ||
| - request: | ||
| body: null | ||
| headers: | ||
| Accept: | ||
| - '*/*' | ||
| Accept-Encoding: | ||
| - gzip, deflate | ||
| Connection: | ||
| - keep-alive | ||
| Content-Type: | ||
| - application/json | ||
| User-Agent: | ||
| - ms-fabric-cli-test/1.0.0 | ||
| method: GET | ||
| uri: https://api.fabric.microsoft.com/v1/capacities | ||
| response: | ||
| body: | ||
| string: '{"value": [{"id": "00000000-0000-0000-0000-000000000004", "displayName": | ||
| "mocked_fabriccli_capacity_name", "sku": "F2", "region": "West Europe", "state": | ||
| "Active"}]}' | ||
| headers: | ||
| Content-Type: | ||
| - application/json; charset=utf-8 | ||
| status: | ||
| code: 200 | ||
| message: OK | ||
| - request: | ||
| body: '{"displayName": "fabriccli_WorkspacePerTestclass_000001", "capacityId": "00000000-0000-0000-0000-000000000004"}' | ||
| headers: | ||
| Accept: | ||
| - '*/*' | ||
| Accept-Encoding: | ||
| - gzip, deflate | ||
| Connection: | ||
| - keep-alive | ||
| Content-Type: | ||
| - application/json | ||
| User-Agent: | ||
| - ms-fabric-cli-test/1.0.0 | ||
| method: POST | ||
| uri: https://api.fabric.microsoft.com/v1/workspaces | ||
| response: | ||
| body: | ||
| string: '{"id": "d5e6f7a8-b9c0-d1e2-f3a4-b5c6d7e8f9a0", "displayName": "fabriccli_WorkspacePerTestclass_000001", | ||
| "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}' | ||
| headers: | ||
| Content-Type: | ||
| - application/json; charset=utf-8 | ||
| status: | ||
| code: 201 | ||
| message: Created | ||
| - request: | ||
| body: null | ||
| headers: | ||
| Accept: | ||
| - '*/*' | ||
| Accept-Encoding: | ||
| - gzip, deflate | ||
| Connection: | ||
| - keep-alive | ||
| Content-Type: | ||
| - application/json | ||
| User-Agent: | ||
| - ms-fabric-cli-test/1.0.0 | ||
| method: GET | ||
| uri: https://api.fabric.microsoft.com/v1/workspaces | ||
| response: | ||
| body: | ||
| string: '{"value": [{"id": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName": | ||
| "My workspace", "description": "", "type": "Personal"}, {"id": "d5e6f7a8-b9c0-d1e2-f3a4-b5c6d7e8f9a0", | ||
| "displayName": "fabriccli_WorkspacePerTestclass_000001", "type": "Workspace", "capacityId": | ||
| "00000000-0000-0000-0000-000000000004"}]}' | ||
| headers: | ||
| Content-Type: | ||
| - application/json; charset=utf-8 | ||
| status: | ||
| code: 200 | ||
| message: OK | ||
| - request: | ||
| body: null | ||
| headers: | ||
| Accept: | ||
| - '*/*' | ||
| Accept-Encoding: | ||
| - gzip, deflate | ||
| Connection: | ||
| - keep-alive | ||
| Content-Type: | ||
| - application/json | ||
| User-Agent: | ||
| - ms-fabric-cli-test/1.0.0 | ||
| method: GET | ||
| uri: https://api.fabric.microsoft.com/v1/workspaces/d5e6f7a8-b9c0-d1e2-f3a4-b5c6d7e8f9a0/items | ||
| response: | ||
| body: | ||
| string: '{"value": []}' | ||
| headers: | ||
| Content-Type: | ||
| - application/json; charset=utf-8 | ||
| status: | ||
| code: 200 | ||
| message: OK | ||
| - request: | ||
| body: null | ||
| headers: | ||
| Accept: | ||
| - '*/*' | ||
| Accept-Encoding: | ||
| - gzip, deflate | ||
| Connection: | ||
| - keep-alive | ||
| Content-Length: | ||
| - '0' | ||
| Content-Type: | ||
| - application/json | ||
| User-Agent: | ||
| - ms-fabric-cli-test/1.0.0 | ||
| method: DELETE | ||
| uri: https://api.fabric.microsoft.com/v1/workspaces/d5e6f7a8-b9c0-d1e2-f3a4-b5c6d7e8f9a0 | ||
| response: | ||
| body: | ||
| string: '' | ||
| headers: | ||
| Content-Type: | ||
| - application/octet-stream | ||
| status: | ||
| code: 200 | ||
| message: OK | ||
| version: 1 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.