-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(metabase): add stateful ingestion
Modify the metabase source to support stateful ingestion Signed-off-by: Pablo Osinaga <[email protected]>
- Loading branch information
Showing
7 changed files
with
1,052 additions
and
36 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
|
@@ -182,7 +182,7 @@ | |
{ | ||
"proposedSnapshot": { | ||
"com.linkedin.pegasus2avro.metadata.snapshot.DashboardSnapshot": { | ||
"urn": "urn:li:dashboard:(metabase,1)", | ||
"urn": "urn:li:dashboard:(metabase,10)", | ||
"aspects": [ | ||
{ | ||
"com.linkedin.pegasus2avro.dashboard.DashboardInfo": { | ||
|
@@ -234,7 +234,59 @@ | |
{ | ||
"proposedSnapshot": { | ||
"com.linkedin.pegasus2avro.metadata.snapshot.DashboardSnapshot": { | ||
"urn": "urn:li:dashboard:(metabase,1)", | ||
"urn": "urn:li:dashboard:(metabase,20)", | ||
"aspects": [ | ||
{ | ||
"com.linkedin.pegasus2avro.dashboard.DashboardInfo": { | ||
"customProperties": {}, | ||
"title": "Dashboard 2", | ||
"description": "", | ||
"charts": [ | ||
"urn:li:chart:(metabase,1)", | ||
"urn:li:chart:(metabase,2)", | ||
"urn:li:chart:(metabase,3)" | ||
], | ||
"datasets": [], | ||
"lastModified": { | ||
"created": { | ||
"time": 1705398694904, | ||
"actor": "urn:li:corpuser:[email protected]" | ||
}, | ||
"lastModified": { | ||
"time": 1705398694904, | ||
"actor": "urn:li:corpuser:[email protected]" | ||
} | ||
}, | ||
"dashboardUrl": "http://localhost:3000/dashboard/20" | ||
} | ||
}, | ||
{ | ||
"com.linkedin.pegasus2avro.common.Ownership": { | ||
"owners": [ | ||
{ | ||
"owner": "urn:li:corpuser:[email protected]", | ||
"type": "DATAOWNER" | ||
} | ||
], | ||
"lastModified": { | ||
"time": 0, | ||
"actor": "urn:li:corpuser:unknown" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"systemMetadata": { | ||
"lastObserved": 1636614000000, | ||
"runId": "metabase-test", | ||
"lastRunId": "no-run-id-provided" | ||
} | ||
}, | ||
{ | ||
"proposedSnapshot": { | ||
"com.linkedin.pegasus2avro.metadata.snapshot.DashboardSnapshot": { | ||
"urn": "urn:li:dashboard:(metabase,10)", | ||
"aspects": [ | ||
{ | ||
"com.linkedin.pegasus2avro.dashboard.DashboardInfo": { | ||
|
@@ -333,7 +385,23 @@ | |
}, | ||
{ | ||
"entityType": "dashboard", | ||
"entityUrn": "urn:li:dashboard:(metabase,1)", | ||
"entityUrn": "urn:li:dashboard:(metabase,10)", | ||
"changeType": "UPSERT", | ||
"aspectName": "status", | ||
"aspect": { | ||
"json": { | ||
"removed": false | ||
} | ||
}, | ||
"systemMetadata": { | ||
"lastObserved": 1636614000000, | ||
"runId": "metabase-test", | ||
"lastRunId": "no-run-id-provided" | ||
} | ||
}, | ||
{ | ||
"entityType": "dashboard", | ||
"entityUrn": "urn:li:dashboard:(metabase,20)", | ||
"changeType": "UPSERT", | ||
"aspectName": "status", | ||
"aspect": { | ||
|
2 changes: 1 addition & 1 deletion
2
metadata-ingestion/tests/integration/metabase/setup/collection_dashboards.json
This file contains 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 |
---|---|---|
@@ -1 +1 @@ | ||
{"total": 1, "data": [{"description": null, "collection_position": null, "database_id": null, "name": "This is a test", "id": 10, "entity_id": "Q4gEaOmoBkfQX3_gXiH9g", "last-edit-info": {"id": 14, "last_name": "Doe", "first_name": "John", "email": "[email protected]", "timestamp": "2024-01-12T14:55:38.43304Z"}, "model": "dashboard"}], "models": ["dashboard"], "limit": null, "offset": null} | ||
{"total":2,"data":[{"description":null,"collection_position":null,"database_id":null,"name":"This is a test","id":10,"entity_id":"Q4gEaOmoBkfQX3_gXiH9g","last-edit-info":{"id":14,"last_name":"Doe","first_name":"John","email":"[email protected]","timestamp":"2024-01-12T14:55:38.43304Z"},"model":"dashboard"},{"description":null,"collection_position":null,"database_id":null,"name":"This is a test","id":20,"entity_id":"R5jSaUsuDkqFK9_gTiH2x","last-edit-info":{"id":14,"last_name":"Doe","first_name":"John","email":"[email protected]","timestamp":"2024-01-12T14:55:38.43304Z"},"model":"dashboard"}],"models":["dashboard"],"limit":null,"offset":null} |
1 change: 1 addition & 0 deletions
1
metadata-ingestion/tests/integration/metabase/setup/collection_dashboards_deleted_item.json
This file contains 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 @@ | ||
{"total": 1, "data": [{"description": null, "collection_position": null, "database_id": null, "name": "This is a test", "id": 10, "entity_id": "Q4gEaOmoBkfQX3_gXiH9g", "last-edit-info": {"id": 14, "last_name": "Doe", "first_name": "John", "email": "[email protected]", "timestamp": "2024-01-12T14:55:38.43304Z"}, "model": "dashboard"}], "models": ["dashboard"], "limit": null, "offset": null} |
This file contains 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
Oops, something went wrong.