-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
108 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
|
||
version: 2.1 | ||
|
||
orbs: | ||
azure-cli: circleci/[email protected] | ||
|
||
jobs: | ||
|
||
integration-redshift: | ||
docker: | ||
- image: cimg/python:3.9.9 | ||
|
@@ -16,7 +14,7 @@ jobs: | |
command: ./run_test.sh redshift | ||
- store_artifacts: | ||
path: ./logs | ||
|
||
integration-snowflake: | ||
docker: | ||
- image: cimg/python:3.9.9 | ||
|
@@ -27,7 +25,7 @@ jobs: | |
command: ./run_test.sh snowflake | ||
- store_artifacts: | ||
path: ./logs | ||
|
||
integration-bigquery: | ||
environment: | ||
BIGQUERY_SERVICE_KEY_PATH: "/home/circleci/bigquery-service-key.json" | ||
|
@@ -102,16 +100,23 @@ jobs: | |
- store_artifacts: | ||
path: ./logs | ||
|
||
|
||
workflows: | ||
version: 2 | ||
test-all: | ||
jobs: | ||
- integration-redshift | ||
- integration-snowflake | ||
- integration-bigquery | ||
- integration-databricks | ||
#- integration-synapse | ||
- integration-redshift: | ||
context: profile-redshift | ||
- integration-snowflake: | ||
context: profile-snowflake | ||
- integration-bigquery: | ||
context: profile-bigquery | ||
- integration-databricks: | ||
context: | ||
- aws-credentials | ||
- profile-databricks | ||
#- integration-synapse: | ||
# context: profile-synapse | ||
#- integration-azuresql: | ||
# context: profile-azure | ||
# requires: | ||
# - integration-synapse |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
* @jtcohen6 | ||
* @jeremyyeo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% macro create_external_schema(source_node) %} | ||
{{ adapter.dispatch('create_external_schema', 'dbt_external_tables')(source_node) }} | ||
{% endmacro %} | ||
|
||
{% macro default__create_external_schema(source_node) %} | ||
{% set ddl %} | ||
create schema if not exists {{ source_node.schema }} | ||
{% endset %} | ||
|
||
{{return(ddl)}} | ||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,28 @@ | ||
{% macro spark__recover_partitions(source_node) %} | ||
{# https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-alter-table.html #} | ||
|
||
{% set ddl %} | ||
{%- if (source_node.external.partitions or source_node.external.recover_partitions) and source_node.external.using and source_node.external.using|lower != 'delta' -%} | ||
ALTER TABLE {{ source(source_node.source_name, source_node.name) }} RECOVER PARTITIONS | ||
{%- if (source_node.external.partitions or source_node.external.recover_partitions) | ||
and source_node.external.using and source_node.external.using|lower != 'delta' -%} | ||
{% set ddl %} | ||
ALTER TABLE {{ source(source_node.source_name, source_node.name) }} RECOVER PARTITIONS | ||
{% endset %} | ||
{%- else -%} | ||
{% set ddl = none %} | ||
{%- endif -%} | ||
{% endset %} | ||
|
||
{{return(ddl)}} | ||
|
||
{% endmacro %} | ||
|
||
{% macro recover_partitions(source_node) %} | ||
{{ return(adapter.dispatch('recover_partitions', 'dbt_external_tables')(source_node)) }} | ||
{% endmacro %} | ||
|
||
{% macro default__recover_partitions(source_node) %} | ||
/*{# | ||
We're dispatching this macro so that users can override it if required on other adapters | ||
but this will work for spark/databricks. | ||
#}*/ | ||
|
||
{{ exceptions.raise_not_implemented('recover_partitions macro not implemented for adapter ' + adapter.type()) }} | ||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{% macro sqlserver__create_external_schema(source_node) %} | ||
{# https://learn.microsoft.com/en-us/sql/t-sql/statements/create-schema-transact-sql?view=sql-server-ver16 #} | ||
|
||
{% set ddl %} | ||
IF NOT EXISTS (SELECT * FROM sys.schemas WHERE name = '{{ source_node.schema }}') | ||
BEGIN | ||
EXEC('CREATE SCHEMA [{{ source_node.schema }}]') | ||
END | ||
{% endset %} | ||
|
||
{{return(ddl)}} | ||
|
||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters