-
Notifications
You must be signed in to change notification settings - Fork 4
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
Get query logs from unity catalog #651
Get query logs from unity catalog #651
Conversation
This pull request has been linked to Shortcut Story #21951: Get query log from Unity Catalog. |
TODO
@dataclass(config=ConnectorConfig)
class SnowflakeQueryLogConfig:
# Number of days back of query logs to fetch, if 0, don't fetch query logs
lookback_days: int = 1
# Query log filter to exclude certain usernames
excluded_usernames: Set[str] = field(default_factory=lambda: set())
# The number of query logs to fetch from Snowflake in one batch
fetch_size: int = DEFAULT_QUERY_LOG_FETCH_SIZE
# Queries larger than this size will not be processed
max_query_size: int = DEFAULT_MAX_QUERY_SIZE
|
68cd94d
to
b108bab
Compare
b108bab
to
9769fde
Compare
Signed-off-by: Tsung-Ju Lii <andy@metaphor.io>
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
Codecov ReportAttention:
... and 31 files with indirect coverage changes 📢 Thoughts on this report? Let us know!. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also update https://github.com/MetaphorData/connectors/blob/main/metaphor/unity_catalog/README.md with the new configs and the requirement of Databricks Premium or above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also include a sample entry of the query log in the description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM at a high level. Will let @elic-eon give the final ship it.
🤔 Why?
(SC links: SC21951, SC21623)
🤓 What?
WorkspaceClient.queriy_history.list
, and return those logs along with the datasets.🧪 Tested?
Description
A sample query log entry: