From e0b05802d5eee53a6bedbb7035247b796c8dcf47 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 8 Feb 2022 10:46:02 -0600 Subject: [PATCH] docs: reference BigQuery REST API defaults in `LoadJobConfig` description --- google/cloud/bigquery/job/load.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/google/cloud/bigquery/job/load.py b/google/cloud/bigquery/job/load.py index b12c3e621..2d68f7f71 100644 --- a/google/cloud/bigquery/job/load.py +++ b/google/cloud/bigquery/job/load.py @@ -33,9 +33,21 @@ class LoadJobConfig(_JobConfig): """Configuration options for load jobs. - All properties in this class are optional. Values which are :data:`None` -> - server defaults. Set properties on the constructed configuration by using - the property name as the name of a keyword argument. + Set properties on the constructed configuration by using the property name + as the name of a keyword argument. Values which are unset or :data:`None` + use the BigQuery REST API default values. See the `BigQuery REST API + reference documentation + `_ + for a list of default values. + + Required options differ based on the + :attr:`~google.cloud.bigquery.job.LoadJobConfig.source_format` value. + For example, the BigQuery API's default value for + :attr:`~google.cloud.bigquery.job.LoadJobConfig.source_format` is ``"CSV"``. + When loading a CSV file, either + :attr:`~google.cloud.bigquery.job.LoadJobConfig.schema` must be set or + :attr:`~google.cloud.bigquery.job.LoadJobConfig.autodetect` must be set to + :data:`True`. """ def __init__(self, **kwargs):