README.md in embulk-output-bigquery-0.1.11 vs README.md in embulk-output-bigquery-0.2.0
- old
+ new
@@ -26,10 +26,11 @@
#### Original options
| name | type | required? | default | description |
|:--------------------------|:------------|:-----------|:-------------|:-----------------------|
+| mode | string | optional | append | [See below](#mode) |
| auth_method | string | optional | "private_key" | `private_key` , `json_key` or `compute_engine`
| service_account_email | string | required when auth_method is private_key | | Your Google service account email
| p12_keyfile | string | required when auth_method is private_key | | Fullpath of private key in P12(PKCS12) format |
| json_keyfile | string | required when auth_method is json_key | | Fullpath of json key |
| sequence_format | string | optional | %03d.%02d | |
@@ -77,9 +78,39 @@
type: csv
header_line: false
encoders:
- {type: gzip}
```
+
+### mode
+
+4 modes are provided.
+
+#### append
+
+default. When append mode, plugin will insert data into existing table.
+
+#### replace
+
+1. Load to temporary table.
+2. Copy temporary table to destination table. (WRITE_TRUNCATE)
+
+```is_skip_job_result_check``` must be false when replace mode
+
+#### replace_backup
+
+1. Load to temporary table.
+2. Copy destination table to backup table. (table_name_old)
+3. Copy temporary table to destination table. (WRITE_TRUNCATE)
+
+```is_skip_job_result_check``` must be false when replace_backup mode.
+
+#### delete_in_advance
+
+1. Delete destination table, if it exists.
+2. Load to destination table.
+
+```auto_create_table``` must be true when delete_in_advance mode.
### Authentication
There are three methods supported to fetch access token for the service account.