Skip to content

Commit

Permalink
Support google-cloud-datacatalog>=1.0.0 (#13097)
Browse files Browse the repository at this point in the history
  • Loading branch information
mik-laj committed Dec 22, 2020
1 parent 872350b commit 9a1d382
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions airflow/providers/google/cloud/hooks/datacatalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ def delete_tag_template_field(
:type metadata: Sequence[Tuple[str, str]]
"""
client = self.get_conn()
name = DataCatalogClient.field_path(project_id, location, tag_template, field)
name = DataCatalogClient.tag_template_field_path(project_id, location, tag_template, field)

self.log.info('Deleting a tag template field: name=%s', name)
client.delete_tag_template_field(
Expand Down Expand Up @@ -860,7 +860,7 @@ def rename_tag_template_field(
:type metadata: Sequence[Tuple[str, str]]
"""
client = self.get_conn()
name = DataCatalogClient.field_path(project_id, location, tag_template, field)
name = DataCatalogClient.tag_template_field_path(project_id, location, tag_template, field)

self.log.info(
'Renaming field: old_name=%s, new_tag_template_field_id=%s', name, new_tag_template_field_id
Expand Down Expand Up @@ -1246,7 +1246,7 @@ def update_tag_template_field( # pylint: disable=too-many-arguments
"""
client = self.get_conn()
if project_id and location and tag_template and tag_template_field_id:
tag_template_field_name = DataCatalogClient.field_path(
tag_template_field_name = DataCatalogClient.tag_template_field_path(
project_id, location, tag_template, tag_template_field_id
)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def write_version(filename: str = os.path.join(*[my_dir, "airflow", "git_version
'google-cloud-bigquery-datatransfer>=0.4.0,<2.0.0',
'google-cloud-bigtable>=1.0.0,<2.0.0',
'google-cloud-container>=0.1.1,<2.0.0',
'google-cloud-datacatalog>=0.5.0, <0.8', # TODO: we should migrate to 1.0 likely and add <2.0.0 then
'google-cloud-datacatalog>=1.0.0,<2.0.0',
'google-cloud-dataproc>=1.0.1,<2.0.0',
'google-cloud-dlp>=0.11.0,<2.0.0',
'google-cloud-kms>=1.2.1,<2.0.0',
Expand Down

0 comments on commit 9a1d382

Please sign in to comment.