@@ -447,8 +447,8 @@ def create_table_if_not_exists(table, dataset: nil, options: nil)
447
447
end
448
448
449
449
opts = { }
450
- Embulk . logger . debug { "embulk-output-bigquery: insert_table(#{ @project } , #{ dataset } , #{ @location_for_log } , #{ body } , #{ opts } )" }
451
- with_network_retry { client . insert_table ( @project , dataset , body , **opts ) }
450
+ Embulk . logger . debug { "embulk-output-bigquery: insert_table(#{ @destination_project } , #{ dataset } , #{ @location_for_log } , #{ body } , #{ opts } )" }
451
+ with_network_retry { client . insert_table ( @destination_project , dataset , body , **opts ) }
452
452
rescue Google ::Apis ::ServerError , Google ::Apis ::ClientError , Google ::Apis ::AuthorizationError => e
453
453
if e . status_code == 409 && /Already Exists:/ =~ e . message
454
454
# ignore 'Already Exists' error
@@ -457,7 +457,7 @@ def create_table_if_not_exists(table, dataset: nil, options: nil)
457
457
458
458
response = { status_code : e . status_code , message : e . message , error_class : e . class }
459
459
Embulk . logger . error {
460
- "embulk-output-bigquery: insert_table(#{ @project } , #{ dataset } , #{ @location_for_log } , #{ body } , #{ opts } ), response:#{ response } "
460
+ "embulk-output-bigquery: insert_table(#{ @destination_project } , #{ dataset } , #{ @location_for_log } , #{ body } , #{ opts } ), response:#{ response } "
461
461
}
462
462
raise Error , "failed to create table #{ @destination_project } :#{ dataset } .#{ table } in #{ @location_for_log } , response:#{ response } "
463
463
end
0 commit comments