🔗Analyzing BigQuery costs by linking the logging export

Follow the below steps to create and integrate a logging sink with Economize, allowing you to analyze BigQuery costs within Reports.

Step 1: Create a Logging sink

  1. Navigate to the BigQuery console to create a new dataset named logging_export in the same project where you created the billing export dataset during onboarding.

  1. For this newly created dataset configure the permission as follows:

    • Select the three vertical dots next to the dataset name, then click Share.

    • On the Share permissions panel that appears on the right, click + ADD PRINCIPAL.

    • In the New principals field, under Add principals, paste the value of the service account based on your selected access method during onboarding.

    • In the Role field, under Assign roles, search for and select BigQuery Data Editor.

  2. Now go to the Log router and select Create Sink.

  1. Provide a sink name and select the BigQuery dataset logging_export that you created earlier as the destination.

  2. Click on the Use partitioned tables checkbox in the form.

  1. Provide the below inclusion filter in Step 3 when asked to Choose logs to include in sink.

Inclusion filter
protoPayload.serviceName="bigquery.googleapis.com" AND protoPayload.methodName="jobservice.jobcompleted"
  1. Leave the exclusion filter empty and click on Create Sink.

Step 2: Integrate Logging sink with Economize

  1. Navigate to the Projects page from the settings of the Economize console.

  1. Click on the pen icon for the project you wish to analyze the BigQuery costs.

  2. Enter the Dataset ID of the BigQuery dataset you created in step 1 in the following text field.

  1. Test your connection to the dataset by clicking on the test button.

  1. Click on the Save Changes button.

SUCCESS

You can now navigate to the Reports within the Economize console and start analyzing the BigQuery costs.

Last updated