<@U06TM7M40RK> how can I use query section in datahub UI for a MSSQL DB schema already ingested?
To use the query section in DataHub UI for a MSSQL DB schema that has already been ingested, you need to understand that DataHub primarily focuses on metadata management rather than executing actual data queries. The query section in the DataHub UI is typically used for metadata queries rather than querying the actual data.
Here are the steps to explore metadata using the query section in DataHub UI:
- Navigate to the Dataset: Go to the DataHub UI and navigate to the dataset representing your MSSQL DB schema.
- Use the Query Button: The query button under any dataset in the DataHub UI allows you to explore metadata aspects like schema, lineage, and other related information.
Example GraphQL Query for Metadata
You can use GraphQL queries to fetch metadata about a dataset, including its schema and lineage. Here is an example:
query {
dataset(urn: "your_dataset_urn") {
name
description
schema {
columns {
name
type
description
}
}
upstreamLineage {
upstreams {
dataset {
name
urn
}
}
}
downstreamLineage {
downstreams {
dataset {
name
urn
}
}
}
}
}
Replace "your_dataset_urn"
with the actual URN of the dataset you are interested in.
Advanced Metadata Queries
DataHub supports advanced queries with pattern matching, logical expressions, and filtering by specific field matches. Here are some examples:
-
Exact match on term or phrase:
/q name: "datahub_schema"
-
Exclude terms:
logging -snowflake
-
Term boolean logic with precedence:
logging + (-snowflake | os_audit_log)
-
Find a dataset with a specific column name:
/q fieldPaths: latitude
For more details on advanced queries, you can refer to the <About DataHub Search | DataHub Search Documentation>.
Would you like more details on any specific aspect of querying metadata or setting up profiling?
Sources:
- <https://datahubproject.io/docs/next/metadata-ingestion/docs/dev_guides/sql_profiles/|Profiling Documentation>
- <Slack Discussion on Querying Data>
- <About DataHub Search | DataHub Search Documentation>
0 button
0 button
Hint: Mention @runllm in the thread for followups.
Hey there! Make sure your message includes the following information if relevant, so we can help more effectively!
- Are you using UI or CLI for ingestion?
- Which DataHub version are you using? (e.g. 0.12.0)
- What data source(s) are you integrating with DataHub? (e.g. BigQuery)
<@U06TM7M40RK> Can you help with the questions in this thread?
We’re experimenting with a new AI assistant for questions in the <#CUMUWQU66> channel to help you track down helpful resources more quickly. Keep in mind that responses may not always be spot-on; feel free to ask it follow-up questions and don’t forget to provide its responses a
or
so other folks in the Community know if you’re still looking for help on the topic!
To help you more effectively, could you please provide the following information?
- Are you using the UI or CLI for ingestion?
- Which DataHub version are you using? (e.g., 0.12.0)?
- What data source(s) are you integrating with DataHub (e.g., BigQuery, MSSQL)?
This information will help me tailor the response to your specific setup.
Sources:
- https://datahubspace.slack.com/archives/CUMUWQU66/p1713205248.273709|https://datahubspace.slack.com/archives/CUMUWQU66/p1713205248.273709
- https://forum.datahubproject.io/t/setting-custom-properties-on-a-dataset-via-openapi-in-datahub/159|https://forum.datahubproject.io/t/setting-custom-properties-on-a-dataset-via-openapi-in-datahub/159
0 button
0 button
Hint: Mention @runllm in the thread for followups.