Skip to content

Commit 8a030d8

Browse files
allowing write_to_table to accept maximumBillingTire parameter
1 parent af4902a commit 8a030d8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

bigquery/client.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,8 @@ def write_to_table(
10481048
priority=None,
10491049
create_disposition=None,
10501050
write_disposition=None,
1051-
use_legacy_sql=None
1051+
use_legacy_sql=None,
1052+
maximum_billing_tier=None
10521053
):
10531054
"""
10541055
Write query result to table. If dataset or table is not provided,
@@ -1077,9 +1078,10 @@ def write_to_table(
10771078
One of the JOB_CREATE_* constants
10781079
write_disposition : str, optional
10791080
One of the JOB_WRITE_* constants
1080-
use_legacy_sql:
1081+
use_legacy_sql: bool, optional
10811082
If False, the query will use BigQuery's standard SQL (https://cloud.google.com/bigquery/sql-reference/)
1082-
1083+
maximum_billing_tier : integer, optional
1084+
Limits the billing tier for this job. Queries that have resource usage beyond this tier will fail (without incurring a charge). If unspecified, this will be set to your project default. For more information, see https://cloud.google.com/bigquery/pricing#high-compute
10831085
10841086
Returns
10851087
-------
@@ -1106,6 +1108,9 @@ def write_to_table(
11061108
if allow_large_results is not None:
11071109
configuration['allowLargeResults'] = allow_large_results
11081110

1111+
if maximum_billing_tier is not None:
1112+
configuration['maximumBillingTier'] = maximum_billing_tier
1113+
11091114
if use_query_cache is not None:
11101115
configuration['useQueryCache'] = use_query_cache
11111116

0 commit comments

Comments
 (0)