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

**URL:** https://community.cloudquery.io/t/can-aws-and-azure-cloudquery-data-coexist-in-a-single-database-without-conflict/664
**Category:** CloudQuery Plugins
**Created:** [October 17, 2023, 2:09am UTC](https://community.cloudquery.io/t/can-aws-and-azure-cloudquery-data-coexist-in-a-single-database-without-conflict/664 "2023-10-17T02:09:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![calm-walrus](https://avatars.discourse-cdn.com/v4/letter/c/8edcca/32.png) [@calm-walrus](https://community.cloudquery.io/u/calm-walrus)
#### Post date: [October 17, 2023, 2:09am UTC](https://community.cloudquery.io/t/can-aws-and-azure-cloudquery-data-coexist-in-a-single-database-without-conflict/664/1 "2023-10-17T02:09:12Z")

</div>

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:

- [AWS Views](https://github.com/cloudquery/cloudquery/tree/main/plugins/source/aws/views)
- [AWS Policies](https://github.com/cloudquery/cloudquery/tree/main/plugins/source/aws/policies)

Azure’s views and policies:

- [Azure Views](https://github.com/cloudquery/cloudquery/tree/main/plugins/source/azure/views)
- [Azure Policies](https://github.com/cloudquery/cloudquery/tree/main/plugins/source/azure/policies)

---

<div class="post-metadata">

### Author: ![erez](https://sea1.discourse-cdn.com/flex001/user_avatar/community.cloudquery.io/erez/32/40_2.png) [@erez](https://community.cloudquery.io/u/erez)
#### Post date: [October 17, 2023, 7:16am UTC](https://community.cloudquery.io/t/can-aws-and-azure-cloudquery-data-coexist-in-a-single-database-without-conflict/664/2 "2023-10-17T07:16:59Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![calm-walrus](https://avatars.discourse-cdn.com/v4/letter/c/8edcca/32.png) [@calm-walrus](https://community.cloudquery.io/u/calm-walrus)
#### Post date: [October 17, 2023, 9:17am UTC](https://community.cloudquery.io/t/can-aws-and-azure-cloudquery-data-coexist-in-a-single-database-without-conflict/664/3 "2023-10-17T09:17:33Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![erez](https://sea1.discourse-cdn.com/flex001/user_avatar/community.cloudquery.io/erez/32/40_2.png) [@erez](https://community.cloudquery.io/u/erez)
#### Post date: [October 17, 2023, 11:35am UTC](https://community.cloudquery.io/t/can-aws-and-azure-cloudquery-data-coexist-in-a-single-database-without-conflict/664/4 "2023-10-17T11:35:20Z")

</div>

Thanks for confirming, Bill! 👍
