@@ -544,7 +544,7 @@ def create_database(
544
544
catalog : str | None = None ,
545
545
force : bool = False ,
546
546
collate : str | None = None ,
547
- job_id : str | None = None ,
547
+ job_id_prefix : str | None = None ,
548
548
** options : Any ,
549
549
) -> None :
550
550
properties = [
@@ -564,7 +564,7 @@ def create_database(
564
564
properties = sge .Properties (expressions = properties ),
565
565
)
566
566
567
- self .raw_sql (stmt .sql (self .name ), job_id = job_id )
567
+ self .raw_sql (stmt .sql (self .name ), job_id_prefix = job_id_prefix )
568
568
569
569
def drop_database (
570
570
self ,
@@ -574,7 +574,7 @@ def drop_database(
574
574
catalog : str | None = None ,
575
575
force : bool = False ,
576
576
cascade : bool = False ,
577
- job_id : str | None = None ,
577
+ job_id_prefix : str | None = None ,
578
578
) -> None :
579
579
"""Drop a BigQuery dataset."""
580
580
stmt = sge .Drop (
@@ -584,7 +584,7 @@ def drop_database(
584
584
cascade = cascade ,
585
585
)
586
586
587
- self .raw_sql (stmt .sql (self .name ), job_id = job_id )
587
+ self .raw_sql (stmt .sql (self .name ), job_id_prefix = job_id_prefix )
588
588
589
589
def table (
590
590
self ,
@@ -670,7 +670,7 @@ def _get_schema_using_query(self, query: str) -> sch.Schema:
670
670
return BigQuerySchema .to_ibis (job .schema )
671
671
672
672
def raw_sql (
673
- self , query : str , params = None , job_id : str | None = None
673
+ self , query : str , params = None , job_id_prefix : str | None = None
674
674
) -> RowIterator :
675
675
query_parameters = [
676
676
bigquery_param (param .type (), value , param .get_name ())
@@ -681,12 +681,12 @@ def raw_sql(
681
681
682
682
job_config = bq .job .QueryJobConfig (query_parameters = query_parameters or [])
683
683
684
- if job_id is not None :
684
+ if job_id_prefix is not None :
685
685
return self .client .query (
686
686
query ,
687
687
job_config = job_config ,
688
688
project = self .billing_project ,
689
- job_id = job_id ,
689
+ job_id_prefix = job_id_prefix ,
690
690
).result ()
691
691
else :
692
692
return self .client .query_and_wait (
@@ -781,14 +781,14 @@ def _to_query(
781
781
* ,
782
782
params : Mapping [ir .Scalar , Any ] | None = None ,
783
783
limit : int | str | None = None ,
784
- job_id : str | None = None ,
784
+ job_id_prefix : str | None = None ,
785
785
** kwargs : Any ,
786
786
) -> RowIterator :
787
787
self ._run_pre_execute_hooks (table_expr )
788
788
sql = self .compile (table_expr , limit = limit , params = params , ** kwargs )
789
789
self ._log (sql )
790
790
791
- return self .raw_sql (sql , params = params , job_id = job_id )
791
+ return self .raw_sql (sql , params = params , job_id_prefix = job_id_prefix )
792
792
793
793
def to_pyarrow (
794
794
self ,
@@ -982,7 +982,7 @@ def create_table(
982
982
partition_by : str | None = None ,
983
983
cluster_by : Iterable [str ] | None = None ,
984
984
options : Mapping [str , Any ] | None = None ,
985
- job_id : str | None = None ,
985
+ job_id_prefix : str | None = None ,
986
986
) -> ir .Table :
987
987
"""Create a table in BigQuery.
988
988
@@ -1015,9 +1015,9 @@ def create_table(
1015
1015
options
1016
1016
BigQuery-specific table options; see the BigQuery documentation for
1017
1017
details: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#table_option_list
1018
- job_id
1019
- Optional custom job ID; when specified, bigquery will use this job ID instead
1020
- of a randomly generated one
1018
+ job_id_prefix
1019
+ Optional custom job ID prefix ; when specified, bigquery will use this as a
1020
+ prefix for the job ID it generates
1021
1021
1022
1022
Returns
1023
1023
-------
@@ -1109,7 +1109,7 @@ def create_table(
1109
1109
1110
1110
sql = stmt .sql (self .name )
1111
1111
1112
- self .raw_sql (sql , job_id = job_id )
1112
+ self .raw_sql (sql , job_id_prefix = job_id_prefix )
1113
1113
return self .table (table .name , database = (table .catalog , table .db ))
1114
1114
1115
1115
def drop_table (
@@ -1119,7 +1119,7 @@ def drop_table(
1119
1119
* ,
1120
1120
database : tuple [str | str ] | str | None = None ,
1121
1121
force : bool = False ,
1122
- job_id : str | None = None ,
1122
+ job_id_prefix : str | None = None ,
1123
1123
) -> None :
1124
1124
table_loc = self ._to_sqlglot_table (database )
1125
1125
catalog , db = self ._to_catalog_db_tuple (table_loc )
@@ -1132,7 +1132,7 @@ def drop_table(
1132
1132
),
1133
1133
exists = force ,
1134
1134
)
1135
- self .raw_sql (stmt .sql (self .name ), job_id = job_id )
1135
+ self .raw_sql (stmt .sql (self .name ), job_id_prefix = job_id_prefix )
1136
1136
1137
1137
def create_view (
1138
1138
self ,
@@ -1142,7 +1142,7 @@ def create_view(
1142
1142
* ,
1143
1143
database : str | None = None ,
1144
1144
overwrite : bool = False ,
1145
- job_id : str | None = None ,
1145
+ job_id_prefix : str | None = None ,
1146
1146
) -> ir .Table :
1147
1147
table_loc = self ._to_sqlglot_table (database )
1148
1148
catalog , db = self ._to_catalog_db_tuple (table_loc )
@@ -1158,7 +1158,7 @@ def create_view(
1158
1158
replace = overwrite ,
1159
1159
)
1160
1160
self ._run_pre_execute_hooks (obj )
1161
- self .raw_sql (stmt .sql (self .name ), job_id = job_id )
1161
+ self .raw_sql (stmt .sql (self .name ), job_id_prefix = job_id_prefix )
1162
1162
return self .table (name , database = (catalog , database ))
1163
1163
1164
1164
def drop_view (
@@ -1168,7 +1168,7 @@ def drop_view(
1168
1168
* ,
1169
1169
database : str | None = None ,
1170
1170
force : bool = False ,
1171
- job_id : str | None = None ,
1171
+ job_id_prefix : str | None = None ,
1172
1172
) -> None :
1173
1173
table_loc = self ._to_sqlglot_table (database )
1174
1174
catalog , db = self ._to_catalog_db_tuple (table_loc )
@@ -1182,7 +1182,7 @@ def drop_view(
1182
1182
),
1183
1183
exists = force ,
1184
1184
)
1185
- self .raw_sql (stmt .sql (self .name ), job_id = job_id )
1185
+ self .raw_sql (stmt .sql (self .name ), job_id_prefix = job_id_prefix )
1186
1186
1187
1187
def _drop_cached_table (self , name ):
1188
1188
self .drop_table (
0 commit comments