Skip to content

Commit de83099

Browse files
committed
pr feedback
1 parent f82fed5 commit de83099

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

awswrangler/catalog/_get.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def get_table_types(
107107
database: str,
108108
table: str,
109109
catalog_id: str | None = None,
110-
return_iceberg_current: bool = False,
110+
filter_iceberg_current: bool = False,
111111
boto3_session: boto3.Session | None = None,
112112
) -> dict[str, str] | None:
113113
"""Get all columns and types from a table.
@@ -121,9 +121,9 @@ def get_table_types(
121121
catalog_id
122122
The ID of the Data Catalog from which to retrieve Databases.
123123
If ``None`` is provided, the AWS account ID is used by default.
124-
return_iceberg_current
125-
If True, returns only current iceberg fields (fields marked with iceberg.field.current: true).
126-
Otherwise, returns the all fields. False by default (return all fields).
124+
filter_iceberg_current
125+
If True, returns only current iceberg fields (fields marked with iceberg.field.current: true).
126+
Otherwise, returns the all fields. False by default (return all fields).
127127
boto3_session
128128
The default boto3 session will be used if **boto3_session** receive ``None``.
129129
@@ -145,7 +145,7 @@ def get_table_types(
145145
return None
146146
return _extract_dtypes_from_table_details(
147147
response=response,
148-
return_iceberg_current=return_iceberg_current,
148+
filter_iceberg_current=filter_iceberg_current,
149149
)
150150

151151

awswrangler/catalog/_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ def _sanitize_name(name: str) -> str:
3333

3434
def _extract_dtypes_from_table_details(
3535
response: "GetTableResponseTypeDef",
36-
return_iceberg_current: bool = False,
36+
filter_iceberg_current: bool = False,
3737
) -> dict[str, str]:
3838
dtypes: dict[str, str] = {}
3939
for col in response["Table"]["StorageDescriptor"]["Columns"]:
4040
# Only return current fields if flag is enabled
41-
if not return_iceberg_current or col.get("Parameters", {}).get("iceberg.field.current") == "true":
41+
if not filter_iceberg_current or col.get("Parameters", {}).get("iceberg.field.current") == "true":
4242
dtypes[col["Name"]] = col["Type"]
4343
# Add partition keys as columns
4444
if "PartitionKeys" in response["Table"]:

0 commit comments

Comments
 (0)