Billing for Looker workloads when using service account

Hi All,

I have a query on configuring the BQ connection in Looker.

How does the billing happen if the Billing Project id I have mentioned in the below screen shot is different than the project id using which the service account was create and configured in the below connection?

If the service account is used to submit queries to BQ then the billing will happen for the Service Account's project ID. Is that true? and the Billing Project ID below will not be used for billing?

 

a_shah_0-1703126699536.png

 

Regards,

Ashish

Solved Solved
1 1 386
1 ACCEPTED SOLUTION

Howdy and great question.  When Looker needs to retrieve data from BigQuery and perform SQL processing, someone has to pay for the query.  The cost is billed to the billing project id that you show in the screen shot.  See here for details.

Now let's talk about a service account.  A service account is named identity that can be granted permissions to access on Google Cloud resources.  When you create a service account, it must have a globally unique name.  It is thus created in a project.  It has an identity that looks something like the following:

<name>@<project>.googleserviceaccount.com

It is that project that "owns" the existence of the service account.  However, once created, there is no relationship between billing and the project in which the service account was created.  Think of the service account is merely a Google identity that can be used for authentication and can have permissions associated with it.

If your service account is created against project PROJ_A and you define your billing project in Looker as PROJ_B then charges for BigQuery consumption through Looker will be associated with PROJ_B irrespective of any use of the service account.

View solution in original post

1 REPLY 1

Howdy and great question.  When Looker needs to retrieve data from BigQuery and perform SQL processing, someone has to pay for the query.  The cost is billed to the billing project id that you show in the screen shot.  See here for details.

Now let's talk about a service account.  A service account is named identity that can be granted permissions to access on Google Cloud resources.  When you create a service account, it must have a globally unique name.  It is thus created in a project.  It has an identity that looks something like the following:

<name>@<project>.googleserviceaccount.com

It is that project that "owns" the existence of the service account.  However, once created, there is no relationship between billing and the project in which the service account was created.  Think of the service account is merely a Google identity that can be used for authentication and can have permissions associated with it.

If your service account is created against project PROJ_A and you define your billing project in Looker as PROJ_B then charges for BigQuery consumption through Looker will be associated with PROJ_B irrespective of any use of the service account.