Change project for Bigquery billing For load jobs

82 Views Asked by At

I am loading into data into BigQuery the following way:

File in storage in project A -> loaded into a table in project B.

I am getting charged for load jobs in project A. How do I transfer these charges to project B?

I am checking my load count in both projects using:

SELECT date(creation_time),
 sum(case  when job_type="QUERY" then 1 else 0 end) as QRY_CNT,
 sum(case  when job_type="LOAD" then 1 else 0 end) as LOAD_CNT,
 sum(case  when job_type="EXTRACT" then 1 else 0 end) as EXT_CNT,
 sum(case  when job_type="COPY" then 1 else 0 end) as CPY_CNT
FROM `region-us`.INFORMATION_SCHEMA.JOBS_BY_PROJECT
group by date(creation_time)
order by 1 desc
1

There are 1 best solutions below

0
Fahed Sabellioglu On

The storage model of BigQuery is based on two components:

  • Compute Pricing
  • Storage Pricing

When you run a load job, by default, it uses the shared pool of slots, therefore it doesn't guarantee you the capacity or throughput that you will see. However, the usage of this shared pool is free for some operations including loading data to BigQuery and exporting data to GCS. The cost you see will be coming from using the service itself, so in your case, it is the cost of storing that data on BigQuery depending on the storage pricing and the region you are using.

If you purchase a dedicated slot and you assign them to your load jobs, then you lose access to the above free pool.

You can benefit from the instructions on this document to see the cost you have per query, service account or table.