Skip to content

tests.system.test_gbq.TestReadGBQIntegration: test_query_with_parameters failed #434

Closed
@flaky-bot

Description

@flaky-bot

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: 928e47b
buildURL: Build Status, Sponge
status: failed

Test output
self = 
project_id = 'precise-truck-742'
def test_query_with_parameters(self, project_id):
    sql_statement = "SELECT @param1 + @param2 AS valid_result"
    config = {
        "query": {
            "useLegacySql": False,
            "parameterMode": "named",
            "queryParameters": [
                {
                    "name": "param1",
                    "parameterType": {"type": "INTEGER"},
                    "parameterValue": {"value": 1},
                },
                {
                    "name": "param2",
                    "parameterType": {"type": "INTEGER"},
                    "parameterValue": {"value": 2},
                },
            ],
        }
    }
    # Test that a query that relies on parameters fails
    # when parameters are not supplied via configuration
    with pytest.raises(ValueError):
        gbq.read_gbq(
            sql_statement,
            project_id=project_id,
            credentials=self.credentials,
            dialect="legacy",
        )

    # Test that the query is successful because we have supplied
    # the correct query parameters via the 'config' option
    df = gbq.read_gbq(
        sql_statement,
        project_id=project_id,
        credentials=self.credentials,
        configuration=config,
        dialect="legacy",
    )
  tm.assert_frame_equal(df, DataFrame({"valid_result": [3]}))

E AssertionError: Attributes of DataFrame.iloc[:, 0] (column name="valid_result") are different
E
E Attribute "dtype" are different
E [left]: Int64
E [right]: int64

tests/system/test_gbq.py:722: AssertionError

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the googleapis/python-bigquery-pandas API.flakybot: flakyTells the Flaky Bot not to close or comment on this issue.flakybot: issueAn issue filed by the Flaky Bot. Should not be added manually.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions