Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Export recommendations to the Big Query table

Hi All,

I have enabled the export of recommendations data to BigQuery. However, the exported data only includes recommendations related to Billing. I need to export data for all active recommendations, including Security, Performance, etc.

Following are the permissions for BigQuery export recommendations. 

bigquery.transfers.update, bigquery.datasets.update, resourcemanager.projects.update, recommender.resources.export, billing.resourceCosts.get at project level, billing.accounts.getSpendingInformation at billing account level.

I have checked the data transfer configuration and ensured that it includes all relevant recommendation categories.

I want to export all active recommendation categories to my BigQuery table.

Any assistance or guidance would be greatly appreciated.

0 2 300
2 REPLIES 2

Looking at the docs here ... there appears to be additional permissions required beyond those which you listed.  I'd also look at the run details and/or Cloud Logging history to see if additional error/information items are recorded.

Hi Venkatesh6,

Welcome to the Google Cloud Community!

It seems like youโ€™re trying to export all active recommendations (such as Security, Performance, etc.) to BigQuery, but only Billing recommendations are being exported. 

In addition to @kolban, here are some ways that might help you to resolve the issue:

  • Recommender API Configuration: Ensure that your Recommender API is correctly configured for all recommendation categories. Verify that the correct categories (Security, Performance, etc.) are selected in your Data Transfer configuration.
  • Verify Permissions: Double-check that your service account has the necessary permissions for all categories. Specifically, ensure โ€˜recommender.resources.exportโ€™ permission is granted in your service account used by the BigQuery Data Transfer Service, not just a user account and that relevant BigQuery permissions (bigquery.transfers.update, bigquery.datasets.update) are correctly assigned.
  • Export Configuration: Check that no filters are limiting the export to only Billing recommendations. Make sure the request to export data isn't restricted to one category.
  • API Logs: Review your logs for any errors or warnings during the export process. You can use the Logs Explorer in the Google Cloud Console to filter logs for BigQuery Data Transfer Service or Recommender API.
  • Manually Export: You might consider using the Recommender API to manually pull recommendations for each category. Use the โ€˜categoryโ€™ parameter in the API request to specify which recommendations to retrieve.
  • Filtered Approach: If needed, you can create multiple export configurations for each category to ensure each recommendation type is exported correctly.

Was this helpful? If so, please accept this answer as โ€œSolutionโ€. If you need additional assistance, reply here within 2 business days and Iโ€™ll be happy to help.