Skip to content

Commit 2ffa21c

Browse files
kaxilAlice Berard
authored and
Alice Berard
committed
[AIRFLOW-XXX] BigQuery Hook - Minor Refactoring (apache#4066)
1 parent e19af1c commit 2ffa21c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

airflow/contrib/hooks/bigquery_hook.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ def create_empty_table(self,
229229
:param table_id: The Name of the table to be created.
230230
:type table_id: str
231231
:param schema_fields: If set, the schema field list as defined here:
232-
https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.load.schema
232+
https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.load.schema
233+
:type schema_fields: list
233234
:param labels: a dictionary containing labels for the table, passed to BigQuery
234235
:type labels: dict
235236
@@ -238,7 +239,6 @@ def create_empty_table(self,
238239
schema_fields=[{"name": "emp_name", "type": "STRING", "mode": "REQUIRED"},
239240
{"name": "salary", "type": "INTEGER", "mode": "NULLABLE"}]
240241
241-
:type schema_fields: list
242242
:param time_partitioning: configure optional time partitioning fields i.e.
243243
partition by field, type and expiration as per API specifications.
244244
@@ -480,7 +480,7 @@ def create_external_table(self,
480480
)
481481

482482
def run_query(self,
483-
sql=None,
483+
sql,
484484
destination_dataset_table=None,
485485
write_disposition='WRITE_EMPTY',
486486
allow_large_results=False,
@@ -522,6 +522,7 @@ def run_query(self,
522522
:type flatten_results: bool
523523
:param udf_config: The User Defined Function configuration for the query.
524524
See https://cloud.google.com/bigquery/user-defined-functions for details.
525+
:type udf_config: list
525526
:param use_legacy_sql: Whether to use legacy SQL (true) or standard SQL (false).
526527
If `None`, defaults to `self.use_legacy_sql`.
527528
:type use_legacy_sql: bool
@@ -532,7 +533,6 @@ def run_query(self,
532533
if you need to provide some params that are not supported by the
533534
BigQueryHook like args.
534535
:type api_resource_configs: dict
535-
:type udf_config: list
536536
:param maximum_billing_tier: Positive integer that serves as a
537537
multiplier of the basic price.
538538
:type maximum_billing_tier: int

0 commit comments

Comments
 (0)