Reference documentation and code samples for the BigQuery Client class CopyJobConfiguration.
Represents a configuration for a copy job. For more information on the available settings please see the Jobs configuration API documentation.
Example:
use Google\Cloud\BigQuery\BigQueryClient;
$bigQuery = new BigQueryClient();
$sourceTable = $bigQuery->dataset('my_dataset')
    ->table('my_source_table');
$destinationTable = $bigQuery->dataset('my_dataset')
    ->table('my_destination_table');
$copyJobConfig = $sourceTable->copy($destinationTable);
Namespace
Google \ Cloud \ BigQueryMethods
__construct
| Parameters | |
|---|---|
| Name | Description | 
| projectId | stringThe project's ID. | 
| config | arrayA set of configuration options for a job. | 
| location | string|nullThe geographic location in which the job is executed. | 
createDisposition
Set whether the job is allowed to create new tables. Creation, truncation and append actions occur as one atomic update upon job completion.
Example:
$copyJobConfig->createDisposition('CREATE_NEVER');
| Parameter | |
|---|---|
| Name | Description | 
| createDisposition | stringThe create disposition. Acceptable
values include  | 
| Returns | |
|---|---|
| Type | Description | 
| CopyJobConfiguration | |
destinationEncryptionConfiguration
Sets the custom encryption configuration (e.g., Cloud KMS keys).
Example:
$copyJobConfig->destinationEncryptionConfiguration([
    'kmsKeyName' => 'my_key'
]);
| Parameter | |
|---|---|
| Name | Description | 
| configuration | arrayCustom encryption configuration. | 
| Returns | |
|---|---|
| Type | Description | 
| CopyJobConfiguration | |
destinationTable
Sets the destination table.
Example:
$table = $bigQuery->dataset('my_dataset')
    ->table('my_table');
$copyJobConfig->destinationTable($table);
| Parameter | |
|---|---|
| Name | Description | 
| destinationTable | TableThe destination table. | 
| Returns | |
|---|---|
| Type | Description | 
| CopyJobConfiguration | |
sourceTable
Sets the source table to copy.
Example:
$table = $bigQuery->dataset('my_dataset')
    ->table('source_table');
$copyJobConfig->sourceTable($table);
| Parameter | |
|---|---|
| Name | Description | 
| sourceTable | TableThe destination table. | 
| Returns | |
|---|---|
| Type | Description | 
| CopyJobConfiguration | |
writeDisposition
Sets the action that occurs if the destination table already exists. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
Example:
$copyJobConfig->writeDisposition('WRITE_TRUNCATE');
| Parameter | |
|---|---|
| Name | Description | 
| writeDisposition | stringThe write disposition. Acceptable values
       include  | 
| Returns | |
|---|---|
| Type | Description | 
| CopyJobConfiguration | |