-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from dbt-labs/add_codespace
enable codespace
- Loading branch information
Showing
8 changed files
with
169 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,94 @@ | ||
// Update the VARIANT arg in docker-compose.yml to pick a Python version: 3, 3.8, 3.7, 3.6 | ||
{ | ||
"name": "dbt", | ||
"dockerFile" : "Dockerfile", | ||
"settings": { | ||
"terminal.integrated.defaultProfile.linux#": "/bin/sh", | ||
"files.associations": { | ||
"*.sql": "jinja-sql", | ||
"*.sqlfluff": "ini", | ||
"*.yml": "yaml", | ||
"**/target/**": "" | ||
}, | ||
"sql.linter.executablePath": "/usr/local/bin/sqlfluff", | ||
"sql.format.enable": true, | ||
"sql.linter.run": "onType", | ||
"files.exclude": { | ||
"**/.git": true, | ||
"**/.svn": true, | ||
"**/.hg": true, | ||
"**/CVS": true, | ||
"**/.DS_Store": true, | ||
"**/__pycache__": true | ||
}, | ||
"findrelated.workspaceRulesets": [ | ||
{ | ||
"name": "sql", | ||
"rules": [ | ||
{ | ||
"pattern": "^(.*/)?models/(.*/)?(.+\\.sql)$", | ||
"locators": [ | ||
"**/compiled/**/$3" | ||
] | ||
}, | ||
{ | ||
"pattern": "^(.*/)?compiled/(.*/)?(.+\\.sql)$", | ||
"locators": [ | ||
"**/run/**/$3" | ||
] | ||
}, | ||
{ | ||
"pattern": "^(.*/)?run/(.*/)?(.+\\.sql)$", | ||
"locators": [ | ||
"**/models/**/$3" | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"findrelated.applyRulesets": [ | ||
"sql" | ||
], | ||
"findrelated.applyWorkspaceRulesets": [ | ||
"sql" | ||
], | ||
"workbench.editor.highlightModifiedTabs": true, | ||
"workbench.editor.labelFormat": "medium", | ||
"workbench.editor.revealIfOpen": true, | ||
"editor.rulers": [ | ||
99 | ||
], | ||
"yaml.schemas": { | ||
"https://raw.githubusercontent.com/dbt-labs/dbt-jsonschema/main/schemas/dbt_yml_files.json": [ | ||
"/*.yml", | ||
"!profiles.yml", | ||
"!dbt_project.yml", | ||
"!packages.yml", | ||
"!selectors.yml", | ||
"!profile_template.yml" | ||
], | ||
"https://raw.githubusercontent.com/dbt-labs/dbt-jsonschema/main/schemas/dbt_project.json": [ | ||
"dbt_project.yml" | ||
], | ||
"https://raw.githubusercontent.com/dbt-labs/dbt-jsonschema/main/schemas/selectors.json": [ | ||
"selectors.yml" | ||
], | ||
"https://raw.githubusercontent.com/dbt-labs/dbt-jsonschema/main/schemas/packages.json": [ | ||
"packages.yml" | ||
] | ||
} | ||
}, | ||
"extensions": [ | ||
"bastienboutonnet.vscode-dbt", | ||
"dorzey.vscode-sqlfluff", | ||
"editorconfig.editorconfig", | ||
"amodio.find-related", | ||
"ms-azuretools.vscode-docker", | ||
"ms-python.python", | ||
"visualstudioexptteam.vscodeintellicode", | ||
"samuelcolvin.jinjahtml", | ||
"redhat.vscode-yaml" | ||
], | ||
|
||
"remoteUser": "vscode" | ||
} |
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,8 @@ | ||
DBT_SNOW_DEV_ACCOUNT= | ||
DBT_SNOW_DEV_WH= | ||
DBT_SNOW_DEV_DB= | ||
DBT_SNOW_SCH= | ||
DBT_SNOW_USER= | ||
DBT_SNOW_PRD_ACCOUNT= | ||
DBT_SNOW_PRD_WH= | ||
DBT_SNOW_PRD_DB= |
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 |
---|---|---|
|
@@ -2,3 +2,7 @@ | |
target/ | ||
dbt_packages/ | ||
logs/ | ||
**/.DS_Store | ||
.user.yml | ||
venv/ | ||
env/ |
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,3 @@ | ||
[sqlfluff] | ||
|
||
dialect = snowflake |
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,16 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. | ||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp | ||
|
||
// List of extensions which should be recommended for users of this workspace. | ||
"recommendations": [ | ||
"innoverio.vscode-dbt-power-user", | ||
"mechatroner.rainbow-csv", | ||
"yzhang.markdown-all-in-one", | ||
"redhat.vscode-yaml" | ||
], | ||
// List of extensions recommended by VS Code that should not be recommended for users of this workspace. | ||
"unwantedRecommendations": [ | ||
|
||
] | ||
} |
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,14 @@ | ||
FROM mcr.microsoft.com/vscode/devcontainers/python:3.9 | ||
|
||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
|
||
RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then groupmod --gid $USER_GID vscode && usermod --uid $USER_UID --gid $USER_GID vscode; fi | ||
|
||
RUN pwd | ||
RUN ls | ||
COPY requirements.txt /tmp/ | ||
RUN pip3 install --upgrade pip | ||
RUN pip3 install --requirement /tmp/requirements.txt | ||
|
||
ENV DBT_PROFILES_DIR=/workspaces/new-python-wrench-demo |
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,27 @@ | ||
config: | ||
partial_parse: true | ||
|
||
variables: | ||
snow-dev: &snow-dev | ||
type: snowflake | ||
account: '{{ env_var("DBT_SNOW_DEV_ACCOUNT") }}' | ||
warehouse: '{{ env_var("DBT_SNOW_DEV_WH") }}' | ||
database: '{{ env_var("DBT_SNOW_DEV_DB") }}' | ||
schema: '{{ env_var("DBT_SNOW_SCH") }}' | ||
user: '{{ env_var("DBT_SNOW_DEV_USER") }}' | ||
role: transformer | ||
authenticator: externalbrowser | ||
threads: 10 | ||
|
||
snow-prd: &snow-prd | ||
<<: *snow-dev | ||
account: '{{ env_var("DBT_SNOW_PRD_ACCOUNT") }}' | ||
warehouse: '{{ env_var("DBT_SNOW_PRD_WH") }}' | ||
database: '{{ env_var("DBT_SNOW_PRD_DB") }}' | ||
schema: '{{ env_var("DBT_SNOW_SCH") }}' | ||
user: '{{ env_var("DBT_SNOW_PRD_USER") }}' | ||
python_wrench: | ||
target: dev | ||
outputs: | ||
dev: *snow-dev | ||
prd: *snow-prd |
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,3 @@ | ||
dbt-snowflake==1.3.0b2 | ||
# extra features | ||
sqlfluff~=1.2.1 |