Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add BigQuery tests to AWS and GCP #421

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/transformations_aws_compliance_free.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
- name: Test Postgres
run: |
cloudquery migrate tests/postgres.yml
dbt run --target dev-pg --profiles-dir ./tests --select aws_compliance__foundational_security_free
dbt run --target dev-pg --profiles-dir ./tests
if: needs.prepare.outputs.postgres == 'true'
env:
CQ_DSN: postgresql://postgres:pass@localhost:5432/postgres
Expand All @@ -122,4 +122,4 @@ jobs:
if: needs.prepare.outputs.bigquery == 'true'
run: |
cloudquery migrate tests/bigquery.yml
dbt run --target dev-bigquery --profiles-dir ./tests --select aws_compliance__foundational_security_free
dbt run --target dev-bigquery --profiles-dir ./tests
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
- name: Test Postgres
run: |
cloudquery migrate tests/postgres.yml
dbt run --target dev-pg --profiles-dir ./tests --select aws_compliance__foundational_security
dbt run --target dev-pg --profiles-dir ./tests
if: needs.prepare.outputs.postgres == 'true'
env:
CQ_DSN: postgresql://postgres:pass@localhost:5432/postgres
Expand All @@ -122,4 +122,4 @@ jobs:
if: needs.prepare.outputs.bigquery == 'true'
run: |
cloudquery migrate tests/bigquery.yml
dbt run --target dev-bigquery --profiles-dir ./tests --select aws_compliance__foundational_security
dbt run --target dev-bigquery --profiles-dir ./tests
18 changes: 18 additions & 0 deletions transformations/aws/compliance-free/tests/bigquery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
kind: source
spec:
name: aws
path: cloudquery/aws
version: "v22.19.2" # latest version of source aws plugin
destinations: ["bigquery"]
tables: ["*"]
---
kind: destination
spec:
name: bigquery
path: cloudquery/bigquery
registry: cloudquery
version: "v3.3.9"
write_mode: "append"
spec:
project_id: cq-integration-tests
dataset_id: policies_premium_ci_test
4 changes: 2 additions & 2 deletions transformations/aws/compliance-free/tests/profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ aws_compliance: # This should match the name in your dbt_project.yml
dev-bigquery:
type: bigquery
method: oauth
project: cq-playground
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cq-playground is nuked on a schedule. We have a dedicated project for integration tests

dataset: bigquery-test # You can also use "schema" here
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Datasets can't have -, only _

project: cq-integration-tests
dataset: policies_premium_ci_test # You can also use "schema" here
threads: 4 # Must be a value of 1 or greater
18 changes: 18 additions & 0 deletions transformations/aws/compliance-premium/tests/bigquery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
kind: source
spec:
name: aws
path: cloudquery/aws
version: "v22.19.2" # latest version of source aws plugin
destinations: ["bigquery"]
tables: ["*"]
---
kind: destination
spec:
name: bigquery
path: cloudquery/bigquery
registry: cloudquery
version: "v3.3.9"
write_mode: "append"
spec:
project_id: cq-integration-tests
dataset_id: policies_premium_ci_test
4 changes: 2 additions & 2 deletions transformations/aws/compliance-premium/tests/profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ aws_compliance: # This should match the name in your dbt_project.yml
dev-bigquery:
type: bigquery
method: oauth
project: cq-playground
dataset: bigquery-test # You can also use "schema" here
project: cq-integration-tests
dataset: policies_premium_ci_test # You can also use "schema" here
threads: 4 # Must be a value of 1 or greater
18 changes: 18 additions & 0 deletions transformations/gcp/compliance-free/tests/bigquery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
kind: source
spec:
name: gcp
path: cloudquery/gcp
version: "v10.0.0" # latest version of source gcp plugin
destinations: ["bigquery"]
tables: ["*"]
---
kind: destination
spec:
name: bigquery
path: cloudquery/bigquery
registry: cloudquery
version: "v3.3.9"
write_mode: "append"
spec:
project_id: cq-integration-tests
dataset_id: policies_premium_ci_test
4 changes: 2 additions & 2 deletions transformations/gcp/compliance-free/tests/profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ gcp_compliance: # This should match the name in your dbt_project.yml
dev-bigquery:
type: bigquery
method: oauth
project: cq-playground
dataset: bigquery-test # You can also use "schema" here
project: cq-integration-tests
dataset: policies_premium_ci_test # You can also use "schema" here
threads: 4 # Must be a value of 1 or greater
18 changes: 18 additions & 0 deletions transformations/gcp/compliance-premium/tests/bigquery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
kind: source
spec:
name: gcp
path: cloudquery/gcp
version: "v10.0.0" # latest version of source gcp plugin
destinations: ["bigquery"]
tables: ["*"]
---
kind: destination
spec:
name: bigquery
path: cloudquery/bigquery
registry: cloudquery
version: "v3.3.9"
write_mode: "append"
spec:
project_id: cq-integration-tests
dataset_id: policies_premium_ci_test
4 changes: 2 additions & 2 deletions transformations/gcp/compliance-premium/tests/profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ gcp_compliance: # This should match the name in your dbt_project.yml
dev-bigquery:
type: bigquery
method: oauth
project: cq-playground
dataset: bigquery-test # You can also use "schema" here
project: cq-integration-tests
dataset: policies_premium_ci_test # You can also use "schema" here
threads: 4 # Must be a value of 1 or greater