@@ -719,9 +719,11 @@ class _JobConfig(object):
719719 job_type (str): The key to use for the job configuration.
720720 """
721721
722- def __init__ (self , job_type ):
722+ def __init__ (self , job_type , ** kwargs ):
723723 self ._job_type = job_type
724724 self ._properties = {job_type : {}}
725+ for prop , val in kwargs .items ():
726+ setattr (self , prop , val )
725727
726728 @property
727729 def labels (self ):
@@ -762,7 +764,7 @@ def _get_sub_prop(self, key, default=None):
762764 ``self._properties[self._job_type]`` dictionary.
763765 default (object):
764766 (Optional) Default value to return if the key is not found.
765- Defaults to `` None` `.
767+ Defaults to :data:` None`.
766768
767769 Returns:
768770 object: The value if present or the default.
@@ -793,7 +795,7 @@ def _set_sub_prop(self, key, value):
793795 _helpers ._set_sub_prop (self ._properties , [self ._job_type , key ], value )
794796
795797 def _del_sub_prop (self , key ):
796- """Reove ``key`` from the ``self._properties[self._job_type]`` dict.
798+ """Remove ``key`` from the ``self._properties[self._job_type]`` dict.
797799
798800 Most job properties are inside the dictionary related to the job type
799801 (e.g. 'copy', 'extract', 'load', 'query'). Use this method to clear
@@ -874,12 +876,13 @@ def from_api_repr(cls, resource):
874876class LoadJobConfig (_JobConfig ):
875877 """Configuration options for load jobs.
876878
877- All properties in this class are optional. Values which are ``None`` ->
878- server defaults.
879+ All properties in this class are optional. Values which are :data:`None` ->
880+ server defaults. Set properties on the constructed configuration by using
881+ the property name as the name of a keyword argument.
879882 """
880883
881- def __init__ (self ):
882- super (LoadJobConfig , self ).__init__ ('load' )
884+ def __init__ (self , ** kwargs ):
885+ super (LoadJobConfig , self ).__init__ ('load' , ** kwargs )
883886
884887 @property
885888 def allow_jagged_rows (self ):
@@ -967,7 +970,7 @@ def destination_encryption_configuration(self):
967970 """google.cloud.bigquery.table.EncryptionConfiguration: Custom
968971 encryption configuration for the destination table.
969972
970- Custom encryption configuration (e.g., Cloud KMS keys) or `` None` `
973+ Custom encryption configuration (e.g., Cloud KMS keys) or :data:` None`
971974 if using default encryption.
972975
973976 See
@@ -1338,7 +1341,7 @@ def destination_encryption_configuration(self):
13381341 encryption configuration for the destination table.
13391342
13401343 Custom encryption configuration (e.g., Cloud KMS keys)
1341- or `` None` ` if using default encryption.
1344+ or :data:` None` if using default encryption.
13421345
13431346 See
13441347 :attr:`google.cloud.bigquery.job.LoadJobConfig.destination_encryption_configuration`.
@@ -1469,12 +1472,13 @@ def from_api_repr(cls, resource, client):
14691472class CopyJobConfig (_JobConfig ):
14701473 """Configuration options for copy jobs.
14711474
1472- All properties in this class are optional. Values which are ``None`` ->
1473- server defaults.
1475+ All properties in this class are optional. Values which are :data:`None` ->
1476+ server defaults. Set properties on the constructed configuration by using
1477+ the property name as the name of a keyword argument.
14741478 """
14751479
1476- def __init__ (self ):
1477- super (CopyJobConfig , self ).__init__ ('copy' )
1480+ def __init__ (self , ** kwargs ):
1481+ super (CopyJobConfig , self ).__init__ ('copy' , ** kwargs )
14781482
14791483 @property
14801484 def create_disposition (self ):
@@ -1509,7 +1513,7 @@ def destination_encryption_configuration(self):
15091513 """google.cloud.bigquery.table.EncryptionConfiguration: Custom
15101514 encryption configuration for the destination table.
15111515
1512- Custom encryption configuration (e.g., Cloud KMS keys) or `` None` `
1516+ Custom encryption configuration (e.g., Cloud KMS keys) or :data:` None`
15131517 if using default encryption.
15141518
15151519 See
@@ -1579,7 +1583,7 @@ def destination_encryption_configuration(self):
15791583 """google.cloud.bigquery.table.EncryptionConfiguration: Custom
15801584 encryption configuration for the destination table.
15811585
1582- Custom encryption configuration (e.g., Cloud KMS keys) or `` None` `
1586+ Custom encryption configuration (e.g., Cloud KMS keys) or :data:` None`
15831587 if using default encryption.
15841588
15851589 See
@@ -1662,12 +1666,13 @@ def from_api_repr(cls, resource, client):
16621666class ExtractJobConfig (_JobConfig ):
16631667 """Configuration options for extract jobs.
16641668
1665- All properties in this class are optional. Values which are ``None`` ->
1666- server defaults.
1669+ All properties in this class are optional. Values which are :data:`None` ->
1670+ server defaults. Set properties on the constructed configuration by using
1671+ the property name as the name of a keyword argument.
16671672 """
16681673
1669- def __init__ (self ):
1670- super (ExtractJobConfig , self ).__init__ ('extract' )
1674+ def __init__ (self , ** kwargs ):
1675+ super (ExtractJobConfig , self ).__init__ ('extract' , ** kwargs )
16711676
16721677 @property
16731678 def compression (self ):
@@ -1906,19 +1911,20 @@ def _to_api_repr_table_defs(value):
19061911class QueryJobConfig (_JobConfig ):
19071912 """Configuration options for query jobs.
19081913
1909- All properties in this class are optional. Values which are ``None`` ->
1910- server defaults.
1914+ All properties in this class are optional. Values which are :data:`None` ->
1915+ server defaults. Set properties on the constructed configuration by using
1916+ the property name as the name of a keyword argument.
19111917 """
19121918
1913- def __init__ (self ):
1914- super (QueryJobConfig , self ).__init__ ('query' )
1919+ def __init__ (self , ** kwargs ):
1920+ super (QueryJobConfig , self ).__init__ ('query' , ** kwargs )
19151921
19161922 @property
19171923 def destination_encryption_configuration (self ):
19181924 """google.cloud.bigquery.table.EncryptionConfiguration: Custom
19191925 encryption configuration for the destination table.
19201926
1921- Custom encryption configuration (e.g., Cloud KMS keys) or `` None` `
1927+ Custom encryption configuration (e.g., Cloud KMS keys) or :data:` None`
19221928 if using default encryption.
19231929
19241930 See
@@ -1966,7 +1972,8 @@ def create_disposition(self, value):
19661972 @property
19671973 def default_dataset (self ):
19681974 """google.cloud.bigquery.dataset.DatasetReference: the default dataset
1969- to use for unqualified table names in the query or ``None`` if not set.
1975+ to use for unqualified table names in the query or :data:`None` if not
1976+ set.
19701977
19711978 See
19721979 https://g.co/cloud/bigquery/docs/reference/v2/jobs#configuration.query.defaultDataset
@@ -1986,7 +1993,7 @@ def default_dataset(self, value):
19861993 @property
19871994 def destination (self ):
19881995 """google.cloud.bigquery.table.TableReference: table where results are
1989- written or `` None` ` if not set.
1996+ written or :data:` None` if not set.
19901997
19911998 See
19921999 https://g.co/cloud/bigquery/docs/reference/rest/v2/jobs#configuration.query.destinationTable
@@ -2005,7 +2012,8 @@ def destination(self, value):
20052012
20062013 @property
20072014 def dry_run (self ):
2008- """bool: ``True`` if this query should be a dry run to estimate costs.
2015+ """bool: :data:`True` if this query should be a dry run to estimate
2016+ costs.
20092017
20102018 See
20112019 https://g.co/cloud/bigquery/docs/reference/v2/jobs#configuration.dryRun
@@ -2045,7 +2053,7 @@ def maximum_billing_tier(self, value):
20452053
20462054 @property
20472055 def maximum_bytes_billed (self ):
2048- """int: Maximum bytes to be billed for this job or `` None` ` if not set.
2056+ """int: Maximum bytes to be billed for this job or :data:` None` if not set.
20492057
20502058 See
20512059 https://g.co/cloud/bigquery/docs/reference/rest/v2/jobs#configuration.query.maximumBytesBilled
@@ -2147,7 +2155,7 @@ def write_disposition(self, value):
21472155 @property
21482156 def table_definitions (self ):
21492157 """Dict[str, google.cloud.bigquery.external_config.ExternalConfig]:
2150- Definitions for external tables or `` None` ` if not set.
2158+ Definitions for external tables or :data:` None` if not set.
21512159
21522160 See
21532161 https://g.co/cloud/bigquery/docs/reference/rest/v2/jobs#configuration.query.tableDefinitions
@@ -2305,7 +2313,7 @@ def destination_encryption_configuration(self):
23052313 """google.cloud.bigquery.table.EncryptionConfiguration: Custom
23062314 encryption configuration for the destination table.
23072315
2308- Custom encryption configuration (e.g., Cloud KMS keys) or `` None` `
2316+ Custom encryption configuration (e.g., Cloud KMS keys) or :data:` None`
23092317 if using default encryption.
23102318
23112319 See
0 commit comments