|
20 | 20 | - {name: price, type: long} |
21 | 21 | - {name: category_id, type: string} |
22 | 22 | max: 2000 |
| 23 | + synchronous_method: true |
23 | 24 | out: |
24 | 25 | type: stdout |
25 | 26 | ``` |
|
41 | 42 | ``` |
42 | 43 |
|
43 | 44 | ## Optional Configuration |
44 | | -This plugin uses the gem [`google-cloud(Google Cloud Client Library for Ruby)`](https://github.com/GoogleCloudPlatform/google-cloud-ruby) and queries data using [the synchronous method](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb#L281). |
| 45 | +This plugin uses the gem [`google-cloud(Google Cloud Client Library for Ruby)`](https://github.com/GoogleCloudPlatform/google-cloud-ruby) and queries data using the synchronous method or the asynchronous method. |
45 | 46 | Therefore some optional configuration items comply with the Google Cloud Client Library. |
46 | 47 |
|
47 | | -- [max](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb#L315) : |
48 | | - - default value : **null** and null value is interpreted as [no maximum row count](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb#L319) in the Google Cloud Client Library. |
49 | | -- [cache](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb#L331) : |
50 | | - - default value : **null** and null value is interpreted as [true](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb#L333) in the Google Cloud Client Library. |
51 | | -- [timeout](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb#L321) : |
52 | | - - default value : **null** and null value is interpreted as [10000](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb#L315) milliseconds in the Google Cloud Client Library. |
53 | | -- [dryrun](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb#L327) : |
54 | | - - default value : **null** and null value is interpreted as [false](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb#L330) in the Google Cloud Client Library. |
55 | | -- [standard_sql](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb#L343): |
56 | | - - default value : **null** and null value is interpreted as [true](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb#L351) in the Google Cloud Client Library. |
57 | | -- [legacy_sql](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb#L353): |
58 | | - - default value : **null** and null value is interpreted as [false](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb#L361) in the Google Cloud Client Library. |
| 48 | +### optional bigquery parameter |
| 49 | + |
| 50 | +The detail of follows params is [here](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb). |
| 51 | + |
| 52 | +- max : |
| 53 | + - default value : **null** and null value is interpreted as no maximum row count in the Google Cloud Client Library. This param is supported only synchronous method. |
| 54 | +- cache : |
| 55 | + - default value : **null** and null value is interpreted as true in the Google Cloud Client Library. |
| 56 | +- timeout : |
| 57 | + - default value : **null** and null value is interpreted as 10000 milliseconds in the Google Cloud Client Library. This param is supported only synchronous method. |
| 58 | +- dryrun : |
| 59 | + - default value : **null** and null value is interpreted as false in the Google Cloud Client Library. This param is supported only synchronous method. |
| 60 | +- standard_sql : |
| 61 | + - default value : **null** and null value is interpreted as true in the Google Cloud Client Library. |
| 62 | +- legacy_sql : |
| 63 | + - default value : **null** and null value is interpreted as false in the Google Cloud Client Library. |
| 64 | +- large_results : |
| 65 | + - default value : **null** and null value is interpreted as false in the Google Cloud Client Library. This param is supported only asynchronous method. |
| 66 | +- write : |
| 67 | + - default value : **null** and null value is interpreted as empty in the Google Cloud Client Library. This param is supported only asynchronous method. |
| 68 | + |
| 69 | +### the bigquery method |
| 70 | +Big query library in Google Cloud Client Library has [two methods](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb) for query. |
| 71 | + |
| 72 | +The default method in this plugin is synchronous_method. |
| 73 | +The logic which how select query method is [here](https://github.com/ykoyano/embulk-input-bigquery/blob/master/lib/embulk/input/bigquery.rb#L41). |
| 74 | + |
| 75 | +- synchronous_method: |
| 76 | + - type : boolean |
| 77 | + - default value : **null** |
| 78 | + - This method uses `query` method in the Google Cloud Client Library. |
| 79 | + - It should be noted that the number of records for `query` method is **limited**. Therefore, if you get many records, you should use `query_job` method with asynchronous_method option. |
| 80 | +- asynchronous_method: |
| 81 | + - type : boolean |
| 82 | + - default value : **null** |
| 83 | + - This method uses `query_job` method in the Google Cloud Client Library. |
0 commit comments