Skip to content

Commit 3a238a5

Browse files
committed
config->configuration
1 parent 82f4409 commit 3a238a5

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

doc/source/io.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4656,13 +4656,13 @@ For more information about query configuration parameters see
46564656

46574657
.. code-block:: python
46584658
4659-
config = {
4659+
configuration = {
46604660
'query': {
46614661
"useQueryCache": False
46624662
}
46634663
}
46644664
data_frame = pd.read_gbq('SELECT * FROM test_dataset.test_table',
4665-
config=config, projectid)
4665+
configuration=configuration, projectid)
46664666
46674667
46684668
.. note::

pandas/io/gbq.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ def run_query(self, query, **kwargs):
394394
# 'preserveNulls', destinationTable, useQueryCache
395395
}
396396
}
397-
config = kwargs.get('config')
397+
config = kwargs.get('configuration')
398398
if config is not None:
399399
if len(config) != 1:
400400
raise ValueError("Only one job type must be specified, but "
@@ -701,10 +701,10 @@ def read_gbq(query, project_id=None, index_col=None, col_order=None,
701701
.. versionadded:: 0.19.0
702702
703703
**kwargs : Arbitrary keyword arguments
704-
config (dict): query config parameters for job processing.
704+
configuration (dict): query config parameters for job processing.
705705
For example:
706706
707-
config = {'query': {'useQueryCache': False}}
707+
configuration = {'query': {'useQueryCache': False}}
708708
709709
For more information see `BigQuery SQL Reference
710710
<https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.query>`

pandas/io/tests/test_gbq.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ def test_query_with_parameters(self):
749749
# the correct query parameters via the 'config' option
750750
df = gbq.read_gbq(sql_statement, project_id=_get_project_id(),
751751
private_key=_get_private_key_path(),
752-
config=config)
752+
configuration=config)
753753
tm.assert_frame_equal(df, DataFrame({'VALID_RESULT': [3]}))
754754

755755
def test_query_inside_configuration(self):
@@ -766,11 +766,11 @@ def test_query_inside_configuration(self):
766766
with tm.assertRaises(ValueError):
767767
gbq.read_gbq(query_no_use, project_id=_get_project_id(),
768768
private_key=_get_private_key_path(),
769-
config=config)
769+
configuration=config)
770770

771771
df = gbq.read_gbq(None, project_id=_get_project_id(),
772772
private_key=_get_private_key_path(),
773-
config=config)
773+
configuration=config)
774774
tm.assert_frame_equal(df, DataFrame({'VALID_STRING': ['PI']}))
775775

776776
def test_configuration_without_query(self):
@@ -794,7 +794,7 @@ def test_configuration_without_query(self):
794794
with tm.assertRaises(ValueError):
795795
gbq.read_gbq(sql_statement, project_id=_get_project_id(),
796796
private_key=_get_private_key_path(),
797-
config=config)
797+
configuration=config)
798798

799799

800800
class TestToGBQIntegration(tm.TestCase):

0 commit comments

Comments
 (0)