File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ def _extract(opts)
2727 def _load ( opts )
2828 _opts = opts . dup
2929 _opts [ :destination_table ] = Google ::Apis ::BigqueryV2 ::TableReference . new ( _opts [ :destination_table ] )
30- _opts [ :schema ] = Google ::Apis ::BigqueryV2 ::TableSchema . new ( { fields : _opts [ :schema ] [ :fields ] } )
30+ _opts [ :schema ] = Google ::Apis ::BigqueryV2 ::TableSchema . new ( _opts [ :schema ] ) if _opts [ :schema ]
3131 Google ::Apis ::BigqueryV2 ::JobConfigurationLoad . new (
3232 _opts
3333 )
Original file line number Diff line number Diff line change @@ -9,15 +9,17 @@ module Insert
99 def load ( opts )
1010 _opts = deep_symbolize_keys ( opts )
1111 job_configuration = Google ::Apis ::BigqueryV2 ::JobConfiguration . new (
12- load : _load ( _opts )
12+ load : _load ( _opts [ :load ] )
1313 )
1414 job_configuration . dry_run = _opts [ :dry_run ] if _opts [ :dry_run ]
1515 job = Google ::Apis ::BigqueryV2 ::Job . new (
1616 configuration : job_configuration
1717 )
18- @client . insert_job (
19- @project_id ,
20- job
18+ api (
19+ @client . insert_job (
20+ @project_id ,
21+ job
22+ )
2123 )
2224 end
2325 end
You can’t perform that action at this time.
0 commit comments