Skip to content

WRITE_TRUNCATE appears to be ignored when passed as an option in a load job #622

@bencromwell

Description

@bencromwell

The documentation suggests to set:

configuration.load.writeDisposition to WRITE_TRUNCATE.

However, when attempting to set the option for this, nothing works. The following array consists of all the options I've tried:

    $options = [
        'configuration.load.writeDisposition' => 'WRITE_TRUNCATE',
        'configuration.writeDisposition' => 'WRITE_TRUNCATE',
        'writeDisposition' => 'WRITE_TRUNCATE',
        'configuration' => [
            'writeDisposition' => 'WRITE_TRUNCATE',
            'load' => [
                'writeDisposition' => 'WRITE_TRUNCATE',
            ],
        ],
    ];

    /** @var $table \Google\Cloud\BigQuery\Table */
    $table->load($data, $options);

I added each option individually, observing each time that the table merely grew in size.

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the BigQuery API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions