Skip to content

Commit c26e6f8

Browse files
committed
Merge branch 'master' into spectrum
2 parents 5f36959 + 74896f0 commit c26e6f8

File tree

2 files changed

+85
-521
lines changed

2 files changed

+85
-521
lines changed

awswrangler/glue.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,19 @@ def metadata_to_glue(self,
6868
description: Optional[str] = None,
6969
parameters: Optional[Dict[str, str]] = None,
7070
columns_comments: Optional[Dict[str, str]] = None) -> None:
71-
"""
71+
"""Create/update a table in the Glue catalog based on a dataframe.
7272
7373
:param dataframe: Pandas Dataframe
74+
:param path: AWS S3 path (E.g. s3://bucket-name/folder_name/
7475
:param objects_paths: Files paths on S3
75-
:param preserve_index: Should preserve index on S3?
76-
:param partition_cols: partitions names
77-
:param mode: "append", "overwrite", "overwrite_partitions"
78-
:param cast_columns: Dictionary of columns names and Athena/Glue types to be casted. (E.g. {"col name": "bigint", "col2 name": "int"}) (Only for "parquet" file_format)
76+
:param file_format: "csv" or "parquet"
7977
:param database: AWS Glue Database name
8078
:param table: AWS Glue table name
81-
:param path: AWS S3 path (E.g. s3://bucket-name/folder_name/
82-
:param file_format: "csv" or "parquet"
79+
:param partition_cols: partitions names
80+
:param preserve_index: Should preserve index on S3?
81+
:param mode: "append", "overwrite", "overwrite_partitions"
8382
:param compression: None, gzip, snappy, etc
83+
:param cast_columns: Dictionary of columns names and Athena/Glue types to be casted. (E.g. {"col name": "bigint", "col2 name": "int"}) (Only for "parquet" file_format)
8484
:param extra_args: Extra arguments specific for each file formats (E.g. "sep" for CSV)
8585
:param description: Table description
8686
:param parameters: Key/value pairs to tag the table (Optional[Dict[str, str]])
@@ -292,7 +292,7 @@ def csv_table_definition(table: str,
292292
compressed = False if compression is None else True
293293
sep = extra_args["sep"] if "sep" in extra_args else ","
294294
sep = "," if sep is None else sep
295-
serde = extra_args.get("serde")
295+
serde = extra_args.get("serde", "OpenCSVSerDe")
296296
if serde == "OpenCSVSerDe":
297297
serde_fullname = "org.apache.hadoop.hive.serde2.OpenCSVSerde"
298298
param = {

0 commit comments

Comments
 (0)