@@ -447,8 +447,8 @@ def create_table_if_not_exists(table, dataset: nil, options: nil)
447447 end
448448
449449 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 ) }
452452 rescue Google ::Apis ::ServerError , Google ::Apis ::ClientError , Google ::Apis ::AuthorizationError => e
453453 if e . status_code == 409 && /Already Exists:/ =~ e . message
454454 # ignore 'Already Exists' error
@@ -457,7 +457,7 @@ def create_table_if_not_exists(table, dataset: nil, options: nil)
457457
458458 response = { status_code : e . status_code , message : e . message , error_class : e . class }
459459 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 } "
461461 }
462462 raise Error , "failed to create table #{ @destination_project } :#{ dataset } .#{ table } in #{ @location_for_log } , response:#{ response } "
463463 end
0 commit comments