Skip to content

Commit

Permalink
impl.py file reformatted
Browse files Browse the repository at this point in the history
  • Loading branch information
brunofaustino committed Aug 28, 2023
1 parent 3927130 commit c4f942b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dbt/adapters/athena/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ def expire_glue_table_versions(
CatalogId=catalog_id,
DatabaseName=relation.schema,
TableName=relation.identifier,
VersionId=str(version)
VersionId=str(version),
)
deleted_versions.append(version)
LOGGER.debug(f"Deleted version {version} of table {relation.render()} ")
Expand Down Expand Up @@ -724,7 +724,7 @@ def persist_docs_to_glue(
CatalogId=catalog_id,
DatabaseName=relation.schema,
TableInput=updated_table,
SkipArchive=skip_archive_table_version
SkipArchive=skip_archive_table_version,
)

@available
Expand Down Expand Up @@ -762,7 +762,9 @@ def get_columns_in_relation(self, relation: AthenaRelation) -> List[AthenaColumn
glue_client = client.session.client("glue", region_name=client.region_name, config=get_boto3_config())

try:
table = glue_client.get_table(CatalogId=catalog_id, DatabaseName=relation.schema, Name=relation.identifier)["Table"]
table = glue_client.get_table(CatalogId=catalog_id, DatabaseName=relation.schema, Name=relation.identifier)[
"Table"
]
except ClientError as e:
if e.response["Error"]["Code"] == "EntityNotFoundException":
LOGGER.debug("table not exist, catching the error")
Expand Down

0 comments on commit c4f942b

Please sign in to comment.