Skip to content

Commit f1eb2f1

Browse files
fhaubnereladkal
andauthored
BigQueryCreateExternalTableOperator fix field delimiter not working with csv (#28856)
* CSV import: Field delimiter not used There is a typo when populating the externalDataConfiguration. Within the csvOptions the property needs to be called "fieldDelimiter" Documentation of the BigQuery csvOptions: https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#CsvOptions Co-authored-by: Elad Kalif <[email protected]>
1 parent ca8249f commit f1eb2f1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

airflow/providers/google/cloud/operators/bigquery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1631,7 +1631,7 @@ def execute(self, context: Context) -> None:
16311631
"autodetect": self.autodetect,
16321632
"compression": self.compression,
16331633
"csvOptions": {
1634-
"fieldDelimeter": self.field_delimiter,
1634+
"fieldDelimiter": self.field_delimiter,
16351635
"skipLeadingRows": self.skip_leading_rows,
16361636
"quote": self.quote_character,
16371637
"allowQuotedNewlines": self.allow_quoted_newlines,

tests/providers/google/cloud/operators/test_bigquery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def test_execute(self, mock_hook):
239239
"autodetect": True,
240240
"compression": "NONE",
241241
"csvOptions": {
242-
"fieldDelimeter": ",",
242+
"fieldDelimiter": ",",
243243
"skipLeadingRows": 0,
244244
"quote": None,
245245
"allowQuotedNewlines": False,

0 commit comments

Comments
 (0)