lib/google/cloud/bigquery/dataset.rb in google-cloud-bigquery-1.51.0 vs lib/google/cloud/bigquery/dataset.rb in google-cloud-bigquery-1.51.1
- old
+ new
@@ -2808,11 +2808,11 @@
def insert_async table_id, skip_invalid: nil, ignore_unknown: nil, max_bytes: 10_000_000, max_rows: 500,
interval: 10, threads: 4, view: nil, &block
ensure_service!
# Get table, don't use Dataset#table which handles NotFoundError
- gapi = service.get_table dataset_id, table_id, metadata_view: view
+ gapi = service.get_project_table project_id, dataset_id, table_id, metadata_view: view
table = Table.from_gapi gapi, service, metadata_view: view
# Get the AsyncInserter from the table
table.insert_async skip_invalid: skip_invalid,
ignore_unknown: ignore_unknown,
max_bytes: max_bytes, max_rows: max_rows,
@@ -2863,10 +2863,11 @@
rows = [rows] if rows.is_a? Hash
raise ArgumentError, "No rows provided" if rows.empty?
ensure_service!
gapi = service.insert_tabledata dataset_id, table_id, rows, skip_invalid: skip_invalid,
ignore_unknown: ignore_unknown,
- insert_ids: insert_ids
+ insert_ids: insert_ids,
+ project_id: project_id
InsertResponse.from_gapi rows, gapi
end
##
# Raise an error unless an active service is available.