Skip to content

Commit

Permalink
Fix BigQueryExampleGen failing without custom_config #6307
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 600997877
  • Loading branch information
lego0901 authored and tfx-copybara committed Jan 24, 2024
1 parent df5118c commit a233a54
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
* Fixed a synchronization bug in google_cloud_ai_platform tuner.
* Print best tuning trials only from the chief worker of google_cloud_ai_platform tuner.
* Add a kpf dependency in the docker-image extra packages.
* Fix BigQueryExampleGen failing without custom_config.

## Dependency Updates
| Package Name | Version Constraints | Previously (in `v1.14.0`) | Comments |
Expand Down
11 changes: 6 additions & 5 deletions tfx/extensions/google_cloud_big_query/example_gen/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ def _BigQueryToExample(pipeline: beam.Pipeline, exec_properties: Dict[str, Any],
"""
project = utils.parse_gcp_project(exec_properties['_beam_pipeline_args'])
converter = _BigQueryConverter(split_pattern, project)
big_query_custom_config = (
json.loads(exec_properties['custom_config'])
if 'custom_config' in exec_properties
else None
)
big_query_custom_config = None
if (
'custom_config' in exec_properties
and exec_properties['custom_config'] is not None
):
big_query_custom_config = json.loads(exec_properties['custom_config'])

return (
pipeline
Expand Down

0 comments on commit a233a54

Please sign in to comment.