Skip to content

Commit 6d81fad

Browse files
committed
fix wording and add comments
1 parent 6e737ec commit 6d81fad

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ Cleanup `auth_method`:
55
* [enhancement] Support `auth_method: authorized_user` (OAuth)
66
* [incompatibility change] Rename `auth_method: json_key` to `auth_method: service_account` (`json_key` is kept for backward compatibility)
77
* [incompatibility change] Remove deprecated `auth_method: private_key` (p12 key)
8-
* [incompatibility change] Change the default `auth_method` to `application_default` from `private_key`.
8+
* [incompatibility change] Change the default `auth_method` to `application_default` from `private_key` because `private_key` was dropped.
99

1010
## 0.5.0 - 2019-08-10
1111

1212
* [incompatibility change] Drop deprecated `time_partitioning`.`require_partition_filter`
1313
* [incompatibility change] Drop `prevent_duplicate_insert` which has no use-case now
14-
* [incompatibility change] Change default value of `auto_create_table` to `true` from `false`
15-
* Modes `replace`, `replace_backup`, `append`, `delete_in_advance`, that is, except `append_direct` requires `auto_create_table: true`.
14+
* [incompatibility change] Modes `replace`, `replace_backup`, `append`, and `delete_in_advance` require `auto_create_table: true` now because, previously, these modes had created a target table even with `auto_create_table: false` and made users being confused. Note that `auto_create_table: true` is always required even for a partition (a table name with a partition decorator) which may not require creating a table. This is for simplicity of logics and implementations.
15+
* [incompatibility change] Change default value of `auto_create_table` to `true` because the above 4 modes, that is, except `append_direct` always require `auto_create_table: true` now.
1616

1717
## 0.4.14 - 2019-08-10
1818

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ OAuth flow for installed applications.
3737
| location | string | optional | nil | geographic location of dataset. See [Location](#location) |
3838
| table | string | required | | table name, or table name with a partition decorator such as `table_name$20160929`|
3939
| auto_create_dataset | boolean | optional | false | automatically create dataset |
40-
| auto_create_table | boolean | optional | true | `false` is available only for `append_direct` mode. Other modes requires `true`. See [Dynamic Table Creating](#dynamic-table-creating) and [Time Partitioning](#time-partitioning) |
40+
| auto_create_table | boolean | optional | true | `false` is available only for `append_direct` mode. Other modes require `true`. See [Dynamic Table Creating](#dynamic-table-creating) and [Time Partitioning](#time-partitioning) |
4141
| schema_file | string | optional | | /path/to/schema.json |
4242
| template_table | string | optional | | template table name. See [Dynamic Table Creating](#dynamic-table-creating) |
4343
| job_status_max_polling_time | int | optional | 3600 sec | Max job status polling time |
@@ -256,12 +256,12 @@ Table ids are formatted at runtime
256256
using the local time of the embulk server.
257257

258258
For example, with the configuration below,
259-
data is inserted into tables `table_2015_04`, `table_2015_05` and so on.
259+
data is inserted into tables `table_20150503`, `table_20150504` and so on.
260260

261261
```yaml
262262
out:
263263
type: bigquery
264-
table: table_%Y_%m
264+
table: table_%Y%m%d
265265
```
266266

267267
### Dynamic table creating
@@ -276,7 +276,7 @@ Please set file path of schema.json.
276276
out:
277277
type: bigquery
278278
auto_create_table: true
279-
table: table_%Y_%m
279+
table: table_%Y%m%d
280280
schema_file: /path/to/schema.json
281281
```
282282

@@ -288,7 +288,7 @@ Plugin will try to read schema from existing table and use it as schema template
288288
out:
289289
type: bigquery
290290
auto_create_table: true
291-
table: table_%Y_%m
291+
table: table_%Y%m%d
292292
template_table: existing_table_name
293293
```
294294

lib/embulk/output/bigquery.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,14 +304,14 @@ def self.auto_create(task, bigquery)
304304
bigquery.create_table_if_not_exists(task['table'])
305305
when 'replace'
306306
bigquery.create_table_if_not_exists(task['temp_table'])
307-
bigquery.create_table_if_not_exists(task['table'])
307+
bigquery.create_table_if_not_exists(task['table']) # needs for when task['table'] is a partition
308308
when 'append'
309309
bigquery.create_table_if_not_exists(task['temp_table'])
310-
bigquery.create_table_if_not_exists(task['table'])
310+
bigquery.create_table_if_not_exists(task['table']) # needs for when task['table'] is a partition
311311
when 'replace_backup'
312312
bigquery.create_table_if_not_exists(task['temp_table'])
313313
bigquery.create_table_if_not_exists(task['table'])
314-
bigquery.create_table_if_not_exists(task['table_old'], dataset: task['dataset_old'])
314+
bigquery.create_table_if_not_exists(task['table_old'], dataset: task['dataset_old']) # needs for when a partition
315315
else # append_direct
316316
if task['auto_create_table']
317317
bigquery.create_table_if_not_exists(task['table'])

0 commit comments

Comments
 (0)