Can AWS and Azure CloudQuery data coexist in a single database without conflict

This is a strange case. My understanding is, the workaround should work, but I post here for a confirmation.

My company prefers PowerBI more than Grafana as the dashboard for CloudQuery (CQ) data, because it’s more powerful.

But PowerBI has a weird limitation - it can only connect to one database server with one user.

When I designed the PostgreSQL (PSQL), I set two databases:

  • cloudquery_aws_prod (user is same name of the database name, with ALL PRIVILEGES)
  • cloudquery_azure_prod (user is same name of the database name, with ALL PRIVILEGES)

It works well, until the business/data teams want to access both data from that PSQL Server with PowerBI.

It can’t.

So the workaround is to sync both AWS and Azure data into one database.

My question here is:

Will it be fine to do that? AWS/Azure has different view resource and policy SQL scripts. Do they work fine without any conflicts when they both run on the same database?

AWS’s views and policies:

Azure’s views and policies:

Hi @calm-walrus,

From a quick look, it seems there’s no overlap, so it should work fine. AWS saves policy results in aws_policy_results, and Azure in azure_policy_results. Regarding the views, they match tables based on the prefixes (e.g. azure_%s), so it should work too.

Have you considered using the same DB but with different schemas for isolation? Different plugin views and policies can be managed under the same database.

Maybe you can’t. Power BI gives you one chance to set the connection to one database server, but you need to take a try.

By the way, without different schemas, I have synchronized AWS and Azure tables into one database. It looks fine to me after I ran the view and policy SQL scripts.

All fine now. Thanks.

Thanks for confirming, Bill! :+1: