10BC0 [Breaking Change] Don't remove destinationTable attribute in `create_job` · Issue #483 · googleapis/python-bigquery · GitHub
[go: up one dir, main page]

Skip to content

[Breaking Change] Don't remove destinationTable attribute in create_job #483

@dinigo

Description

@dinigo

What happened:

I run a job with a query and a destination table and the table is not generated from the file.

bq_client.create_job({
    'query': {
        'query': rendered_query,
        'destinationTable': {
            'projectId': GCP_PROJECT,
            'datasetId': DATASET_ID,
            'tableId': TRANSFORMED_TABLE_ID
        },
        'writeDisposition': 'WRITE_TRUNCATE'
})

My code executes successfully and produces the following job in the console
image

How to fix it

There is a line where the destinationTable is removed from the job config. Removing the line that deletes the property in the job configuration will do.

_del_sub_prop(copy_config, ["query", "destinationTable"])

Can anyone explain why is the destinationTable property removed?

In the meanwhile I'm opening a PR

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.semver: majorHint for users that this is an API breaking change.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

    0