-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ingest): detect source table for cards sourced from other cards
Metabase question (datahub Card) may not query database table directly but rather use another question as source. The change makes ingestion to attempt finding the source database table from source question in recursive manner.
- Loading branch information
Showing
5 changed files
with
518 additions
and
14 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 |
---|---|---|
|
@@ -115,6 +115,61 @@ | |
"runId": "metabase-test" | ||
} | ||
}, | ||
{ | ||
"proposedSnapshot": { | ||
"com.linkedin.pegasus2avro.metadata.snapshot.ChartSnapshot": { | ||
"urn": "urn:li:chart:(metabase,3)", | ||
"aspects": [ | ||
{ | ||
"com.linkedin.pegasus2avro.chart.ChartInfo": { | ||
"customProperties": { | ||
"Metrics": "Distinct values of order_number, Sum of nominal_total", | ||
"Filters": "['time-interval', ['field', 'completed_at', {'base-type': 'type/DateTimeWithTZ'}], -8, 'day', {'include-current': False}]", | ||
"Dimensions": "completed_at" | ||
}, | ||
"title": "Question with data from other question", | ||
"description": "", | ||
"lastModified": { | ||
"created": { | ||
"time": 1685628119636, | ||
"actor": "urn:li:corpuser:[email protected]" | ||
}, | ||
"lastModified": { | ||
"time": 1685628119636, | ||
"actor": "urn:li:corpuser:[email protected]" | ||
} | ||
}, | ||
"chartUrl": "http://localhost:3000/card/3", | ||
"inputs": [ | ||
{ | ||
"string": "urn:li:dataset:(urn:li:dataPlatform:bigquery,acryl-data.public.payment,PROD)" | ||
} | ||
], | ||
"type": "TABLE" | ||
} | ||
}, | ||
{ | ||
"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" | ||
} | ||
}, | ||
{ | ||
"proposedSnapshot": { | ||
"com.linkedin.pegasus2avro.metadata.snapshot.DashboardSnapshot": { | ||
|
@@ -195,6 +250,21 @@ | |
"runId": "metabase-test" | ||
} | ||
}, | ||
{ | ||
"entityType": "chart", | ||
"entityUrn": "urn:li:chart:(metabase,3)", | ||
"changeType": "UPSERT", | ||
"aspectName": "status", | ||
"aspect": { | ||
"json": { | ||
"removed": false | ||
} | ||
}, | ||
"systemMetadata": { | ||
"lastObserved": 1636614000000, | ||
"runId": "metabase-test" | ||
} | ||
}, | ||
{ | ||
"entityType": "dashboard", | ||
"entityUrn": "urn:li:dashboard:(metabase,1)", | ||
|
Oops, something went wrong.