-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat(ingest): bigquery - external url support and a small profiling filter fix #6714
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
56ed27d
Adding external urls to biquery tables
treff7es a4a9eea
Fix for profiling
treff7es 5accc11
Merge branch 'master' into bq_external_url
treff7es a4bc985
black formatting
treff7es 082db4c
Adding config option to enable/disable external url
treff7es 0bc2b25
Merge branch 'master' into bq_external_url
treff7es 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
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 |
---|---|---|
|
@@ -48,6 +48,11 @@ class BigQueryV2Config(BigQueryConfig, LineageConfig): | |
description="Regex patterns for dataset to filter in ingestion. Specify regex to only match the schema name. e.g. to match all tables in schema analytics, use the regex 'analytics'", | ||
) | ||
|
||
match_fully_qualified_names: bool = Field( | ||
default=False, | ||
description="Whether `dataset_pattern` is matched against fully qualified dataset name `<project_id>.<dataset_name>`.", | ||
) | ||
|
||
debug_include_full_payloads: bool = Field( | ||
default=False, | ||
description="Include full payload into events. It is only for debugging and internal use.", | ||
|
@@ -128,6 +133,20 @@ def backward_compatibility_configs_set(cls, values: Dict) -> Dict: | |
logging.warning( | ||
"schema_pattern will be ignored in favour of dataset_pattern. schema_pattern will be deprecated, please use dataset_pattern only." | ||
) | ||
|
||
match_fully_qualified_names = values.get("match_fully_qualified_names") | ||
|
||
if ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. amazing! |
||
dataset_pattern is not None | ||
and dataset_pattern != AllowDenyPattern.allow_all() | ||
and match_fully_qualified_names is not None | ||
and not match_fully_qualified_names | ||
): | ||
logger.warning( | ||
"Please update `dataset_pattern` to match against fully qualified schema name `<project_id>.<dataset_name>` and set config `match_fully_qualified_names : True`." | ||
"Current default `match_fully_qualified_names: False` is only to maintain backward compatibility. " | ||
"The config option `match_fully_qualified_names` will be deprecated in future and the default behavior will assume `match_fully_qualified_names: True`." | ||
) | ||
return values | ||
|
||
def get_table_pattern(self, pattern: List[str]) -> str: | ||
|
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 |
---|---|---|
|
@@ -8,6 +8,9 @@ | |
BQ_DATETIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ" | ||
BQ_DATE_SHARD_FORMAT = "%Y%m%d" | ||
|
||
BQ_EXTERNAL_TABLE_URL_TEMPLATE = "https://console.cloud.google.com/bigquery?project={project}&ws=!1m5!1m4!4m3!1s{project}!2s{dataset}!3s{table}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is great! thanks for extracting into a nice place. |
||
BQ_EXTERNAL_DATASET_URL_TEMPLATE = "https://console.cloud.google.com/bigquery?project={project}&ws=!1m4!1m3!3m2!1s{project}!2s{dataset}" | ||
|
||
|
||
def _make_gcp_logging_client( | ||
project_id: Optional[str] = None, extra_client_options: Dict[str, Any] = {} | ||
|
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
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.
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.
nice!