From 98f9c99a5419def0b942b50561c383bc47673967 Mon Sep 17 00:00:00 2001 From: yashbhalerao5015 Date: Tue, 9 Jun 2026 16:33:13 +0530 Subject: [PATCH] Initialize dbt project and configure Snowflake profile --- airstats/.gitignore | 4 + airstats/.user.yml | 1 + airstats/README.md | 15 + airstats/analyses/.gitkeep | 0 airstats/dbt_project.yml | 36 +++ airstats/logs/dbt.log | 297 ++++++++++++++++++ airstats/macros/.gitkeep | 0 .../models/example/my_first_dbt_model.sql | 27 ++ .../models/example/my_second_dbt_model.sql | 6 + airstats/models/example/schema.yml | 21 ++ airstats/profiles.yml | 13 + airstats/seeds/.gitkeep | 0 airstats/snapshots/.gitkeep | 0 airstats/tests/.gitkeep | 0 14 files changed, 420 insertions(+) create mode 100644 airstats/.gitignore create mode 100644 airstats/.user.yml create mode 100644 airstats/README.md create mode 100644 airstats/analyses/.gitkeep create mode 100644 airstats/dbt_project.yml create mode 100644 airstats/logs/dbt.log create mode 100644 airstats/macros/.gitkeep create mode 100644 airstats/models/example/my_first_dbt_model.sql create mode 100644 airstats/models/example/my_second_dbt_model.sql create mode 100644 airstats/models/example/schema.yml create mode 100644 airstats/profiles.yml create mode 100644 airstats/seeds/.gitkeep create mode 100644 airstats/snapshots/.gitkeep create mode 100644 airstats/tests/.gitkeep diff --git a/airstats/.gitignore b/airstats/.gitignore new file mode 100644 index 0000000..49f147c --- /dev/null +++ b/airstats/.gitignore @@ -0,0 +1,4 @@ + +target/ +dbt_packages/ +logs/ diff --git a/airstats/.user.yml b/airstats/.user.yml new file mode 100644 index 0000000..5a0cc4c --- /dev/null +++ b/airstats/.user.yml @@ -0,0 +1 @@ +id: 529f5064-32ca-4232-816f-f367df83945d diff --git a/airstats/README.md b/airstats/README.md new file mode 100644 index 0000000..7874ac8 --- /dev/null +++ b/airstats/README.md @@ -0,0 +1,15 @@ +Welcome to your new dbt project! + +### Using the starter project + +Try running the following commands: +- dbt run +- dbt test + + +### Resources: +- Learn more about dbt [in the docs](https://docs.getdbt.com/docs/introduction) +- Check out [Discourse](https://discourse.getdbt.com/) for commonly asked questions and answers +- Join the [chat](https://community.getdbt.com/) on Slack for live discussions and support +- Find [dbt events](https://events.getdbt.com) near you +- Check out [the blog](https://blog.getdbt.com/) for the latest news on dbt's development and best practices diff --git a/airstats/analyses/.gitkeep b/airstats/analyses/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/airstats/dbt_project.yml b/airstats/dbt_project.yml new file mode 100644 index 0000000..859aaa3 --- /dev/null +++ b/airstats/dbt_project.yml @@ -0,0 +1,36 @@ + +# Name your project! Project names should contain only lowercase characters +# and underscores. A good package name should reflect your organization's +# name or the intended use of these models +name: 'airstats' +version: '1.0.0' + +# This setting configures which "profile" dbt uses for this project. +profile: 'airstats' + +# These configurations specify where dbt should look for different types of files. +# The `model-paths` config, for example, states that models in this project can be +# found in the "models/" directory. You probably won't need to change these! +model-paths: ["models"] +analysis-paths: ["analyses"] +test-paths: ["tests"] +seed-paths: ["seeds"] +macro-paths: ["macros"] +snapshot-paths: ["snapshots"] + +clean-targets: # directories to be removed by `dbt clean` + - "target" + - "dbt_packages" + + +# Configuring models +# Full documentation: https://docs.getdbt.com/docs/configuring-models + +# In this example config, we tell dbt to build all models in the example/ +# directory as views. These settings can be overridden in the individual model +# files using the `{{ config(...) }}` macro. +models: + airstats: + # Config indicated by + and applies to all files under models/example/ + example: + +materialized: view diff --git a/airstats/logs/dbt.log b/airstats/logs/dbt.log new file mode 100644 index 0000000..6df7994 --- /dev/null +++ b/airstats/logs/dbt.log @@ -0,0 +1,297 @@ +15:40:48.268985 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [, , ]} + + +============================== 15:40:48.280937 | f27b7409-8462-4a65-9663-a77e258a26a1 ============================== +15:40:48.280937 [info ] [MainThread]: Running with dbt=1.11.2 +15:40:48.282354 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'None', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'profiles_dir': 'C:\\Users\\YASH\\Desktop\\dbt_project\\dbt-capstone-project\\airstats', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'partial_parse': 'True', 'indirect_selection': 'eager', 'use_colors': 'True', 'invocation_command': 'dbt debug', 'use_experimental_parser': 'False', 'log_path': 'C:\\Users\\YASH\\Desktop\\dbt_project\\dbt-capstone-project\\airstats\\logs'} +15:40:48.367667 [info ] [MainThread]: dbt version: 1.11.2 +15:40:48.368743 [info ] [MainThread]: python version: 3.13.13 +15:40:48.369840 [info ] [MainThread]: python path: C:\Users\YASH\Desktop\dbt_project\dbt-capstone-project\.venv\Scripts\python.exe +15:40:48.370740 [info ] [MainThread]: os info: Windows-11-10.0.26200-SP0 +15:40:49.873299 [debug] [MainThread]: Snowflake adapter: Setting snowflake.connector to ERROR (file logging only) +15:40:49.874180 [debug] [MainThread]: Snowflake adapter: Setting botocore to ERROR (file logging only) +15:40:49.874806 [debug] [MainThread]: Snowflake adapter: Setting boto3 to ERROR (file logging only) +15:40:50.020042 [info ] [MainThread]: Using profiles dir at C:\Users\YASH\Desktop\dbt_project\dbt-capstone-project\airstats +15:40:50.021467 [info ] [MainThread]: Using profiles.yml file at C:\Users\YASH\Desktop\dbt_project\dbt-capstone-project\airstats\profiles.yml +15:40:50.022654 [info ] [MainThread]: Using dbt_project.yml file at C:\Users\YASH\Desktop\dbt_project\dbt-capstone-project\airstats\dbt_project.yml +15:40:50.029433 [info ] [MainThread]: adapter type: snowflake +15:40:50.030400 [info ] [MainThread]: adapter version: 1.11.1 +15:40:50.237360 [info ] [MainThread]: Configuration: +15:40:50.238362 [info ] [MainThread]: profiles.yml file [OK found and valid] +15:40:50.239303 [info ] [MainThread]: dbt_project.yml file [OK found and valid] +15:40:50.240214 [info ] [MainThread]: Required dependencies: +15:40:50.241174 [debug] [MainThread]: Executing "git --help" +15:40:50.329795 [debug] [MainThread]: STDOUT: "b"usage: git [-v | --version] [-h | --help] [-C ] [-c =]\n [--exec-path[=]] [--html-path] [--man-path] [--info-path]\n [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]\n [--git-dir=] [--work-tree=] [--namespace=]\n [--super-prefix=] [--config-env==]\n []\n\nThese are common Git commands used in various situations:\n\nstart a working area (see also: git help tutorial)\n clone Clone a repository into a new directory\n init Create an empty Git repository or reinitialize an existing one\n\nwork on the current change (see also: git help everyday)\n add Add file contents to the index\n mv Move or rename a file, a directory, or a symlink\n restore Restore working tree files\n rm Remove files from the working tree and from the index\n\nexamine the history and state (see also: git help revisions)\n bisect Use binary search to find the commit that introduced a bug\n diff Show changes between commits, commit and working tree, etc\n grep Print lines matching a pattern\n log Show commit logs\n show Show various types of objects\n status Show the working tree status\n\ngrow, mark and tweak your common history\n branch List, create, or delete branches\n commit Record changes to the repository\n merge Join two or more development histories together\n rebase Reapply commits on top of another base tip\n reset Reset current HEAD to the specified state\n switch Switch branches\n tag Create, list, delete or verify a tag object signed with GPG\n\ncollaborate (see also: git help workflows)\n fetch Download objects and refs from another repository\n pull Fetch from and integrate with another repository or a local branch\n push Update remote refs along with associated objects\n\n'git help -a' and 'git help -g' list available subcommands and some\nconcept guides. See 'git help ' or 'git help '\nto read about a specific subcommand or concept.\nSee 'git help git' for an overview of the system.\n"" +15:40:50.330670 [debug] [MainThread]: STDERR: "b''" +15:40:50.331395 [info ] [MainThread]: - git [OK found] + +15:40:50.332486 [info ] [MainThread]: Connection: +15:40:50.333345 [info ] [MainThread]: account: https://mmsarnl-np16286.snowflakecomputing.com +15:40:50.334262 [info ] [MainThread]: user: YB5015 +15:40:50.335049 [info ] [MainThread]: database: AIRSTATS +15:40:50.335802 [info ] [MainThread]: warehouse: AIRSTAT_WH +15:40:50.336885 [info ] [MainThread]: role: dev +15:40:50.337842 [info ] [MainThread]: schema: dev +15:40:50.338642 [info ] [MainThread]: authenticator: None +15:40:50.339394 [info ] [MainThread]: oauth_client_id: None +15:40:50.340026 [info ] [MainThread]: query_tag: None +15:40:50.340693 [info ] [MainThread]: client_session_keep_alive: False +15:40:50.341345 [info ] [MainThread]: host: None +15:40:50.342160 [info ] [MainThread]: port: None +15:40:50.343080 [info ] [MainThread]: proxy_host: None +15:40:50.344120 [info ] [MainThread]: proxy_port: None +15:40:50.345162 [info ] [MainThread]: protocol: None +15:40:50.346001 [info ] [MainThread]: connect_retries: 1 +15:40:50.346794 [info ] [MainThread]: connect_timeout: None +15:40:50.347631 [info ] [MainThread]: retry_on_database_errors: False +15:40:50.348429 [info ] [MainThread]: retry_all: False +15:40:50.349223 [info ] [MainThread]: insecure_mode: False +15:40:50.350101 [info ] [MainThread]: reuse_connections: True +15:40:50.350918 [info ] [MainThread]: s3_stage_vpce_dns_name: None +15:40:50.351784 [info ] [MainThread]: platform_detection_timeout_seconds: 0.0 +15:40:50.353241 [info ] [MainThread]: Registered adapter: snowflake=1.11.1 +15:40:51.522366 [debug] [MainThread]: Acquiring new snowflake connection 'debug' +15:40:52.043713 [debug] [MainThread]: Using snowflake connection "debug" +15:40:52.044401 [debug] [MainThread]: On debug: select 1 as id +15:40:52.044920 [debug] [MainThread]: Opening a new connection, currently in state init +15:41:02.736529 [debug] [MainThread]: Snowflake adapter: Error running SQL: select 1 as id +15:41:02.737479 [debug] [MainThread]: Snowflake adapter: Rolling back transaction. +15:41:02.738101 [info ] [MainThread]: Connection test: [ERROR] + +15:41:02.738996 [info ] [MainThread]: 1 check failed: +15:41:02.740220 [info ] [MainThread]: dbt was unable to connect to the specified database. +The database returned the following error: + + >Database Error + 250001: Could not connect to Snowflake backend after 2 attempt(s).Aborting + +Check your database credentials and try again. For more information, visit: +https://docs.getdbt.com/docs/configure-your-profile + + +15:41:02.742603 [debug] [MainThread]: Command `dbt debug` failed at 15:41:02.742344 after 14.79 seconds +15:41:02.743333 [debug] [MainThread]: Connection 'debug' was left open. +15:41:02.743873 [debug] [MainThread]: On debug: No close available on handle +15:41:02.744502 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [, , ]} +15:41:02.745299 [debug] [MainThread]: Flushing usage events +15:41:04.644396 [debug] [MainThread]: An error was encountered while trying to flush usage events +16:15:25.288420 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [, , ]} + + +============================== 16:15:25.295295 | 57a946af-dee3-4728-9b58-f1cb8ff3adbe ============================== +16:15:25.295295 [info ] [MainThread]: Running with dbt=1.11.2 +16:15:25.296172 [debug] [MainThread]: running dbt with arguments {'version_check': 'True', 'no_print': 'None', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'empty': 'None', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'log_format': 'default', 'debug': 'False', 'fail_fast': 'False', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\Users\\YASH\\Desktop\\dbt_project\\dbt-capstone-project\\airstats', 'use_colors': 'True', 'indirect_selection': 'eager', 'invocation_command': 'dbt debug', 'use_experimental_parser': 'False', 'log_path': 'C:\\Users\\YASH\\Desktop\\dbt_project\\dbt-capstone-project\\airstats\\logs'} +16:15:25.335527 [info ] [MainThread]: dbt version: 1.11.2 +16:15:25.335995 [info ] [MainThread]: python version: 3.13.13 +16:15:25.336388 [info ] [MainThread]: python path: C:\Users\YASH\Desktop\dbt_project\dbt-capstone-project\.venv\Scripts\python.exe +16:15:25.336741 [info ] [MainThread]: os info: Windows-11-10.0.26200-SP0 +16:15:26.107525 [debug] [MainThread]: Snowflake adapter: Setting snowflake.connector to ERROR (file logging only) +16:15:26.107974 [debug] [MainThread]: Snowflake adapter: Setting botocore to ERROR (file logging only) +16:15:26.108258 [debug] [MainThread]: Snowflake adapter: Setting boto3 to ERROR (file logging only) +16:15:26.171232 [info ] [MainThread]: Using profiles dir at C:\Users\YASH\Desktop\dbt_project\dbt-capstone-project\airstats +16:15:26.171871 [info ] [MainThread]: Using profiles.yml file at C:\Users\YASH\Desktop\dbt_project\dbt-capstone-project\airstats\profiles.yml +16:15:26.172349 [info ] [MainThread]: Using dbt_project.yml file at C:\Users\YASH\Desktop\dbt_project\dbt-capstone-project\airstats\dbt_project.yml +16:15:26.174732 [info ] [MainThread]: adapter type: snowflake +16:15:26.175105 [info ] [MainThread]: adapter version: 1.11.1 +16:15:26.266407 [info ] [MainThread]: Configuration: +16:15:26.266932 [info ] [MainThread]: profiles.yml file [OK found and valid] +16:15:26.267292 [info ] [MainThread]: dbt_project.yml file [OK found and valid] +16:15:26.267586 [info ] [MainThread]: Required dependencies: +16:15:26.267888 [debug] [MainThread]: Executing "git --help" +16:15:26.313923 [debug] [MainThread]: STDOUT: "b"usage: git [-v | --version] [-h | --help] [-C ] [-c =]\n [--exec-path[=]] [--html-path] [--man-path] [--info-path]\n [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]\n [--git-dir=] [--work-tree=] [--namespace=]\n [--super-prefix=] [--config-env==]\n []\n\nThese are common Git commands used in various situations:\n\nstart a working area (see also: git help tutorial)\n clone Clone a repository into a new directory\n init Create an empty Git repository or reinitialize an existing one\n\nwork on the current change (see also: git help everyday)\n add Add file contents to the index\n mv Move or rename a file, a directory, or a symlink\n restore Restore working tree files\n rm Remove files from the working tree and from the index\n\nexamine the history and state (see also: git help revisions)\n bisect Use binary search to find the commit that introduced a bug\n diff Show changes between commits, commit and working tree, etc\n grep Print lines matching a pattern\n log Show commit logs\n show Show various types of objects\n status Show the working tree status\n\ngrow, mark and tweak your common history\n branch List, create, or delete branches\n commit Record changes to the repository\n merge Join two or more development histories together\n rebase Reapply commits on top of another base tip\n reset Reset current HEAD to the specified state\n switch Switch branches\n tag Create, list, delete or verify a tag object signed with GPG\n\ncollaborate (see also: git help workflows)\n fetch Download objects and refs from another repository\n pull Fetch from and integrate with another repository or a local branch\n push Update remote refs along with associated objects\n\n'git help -a' and 'git help -g' list available subcommands and some\nconcept guides. See 'git help ' or 'git help '\nto read about a specific subcommand or concept.\nSee 'git help git' for an overview of the system.\n"" +16:15:26.314414 [debug] [MainThread]: STDERR: "b''" +16:15:26.314776 [info ] [MainThread]: - git [OK found] + +16:15:26.315166 [info ] [MainThread]: Connection: +16:15:26.315710 [info ] [MainThread]: account: https://mmsarnl-np16286.snowflakecomputing.com +16:15:26.316134 [info ] [MainThread]: user: YB5015 +16:15:26.316493 [info ] [MainThread]: database: AIRSTATS +16:15:26.316807 [info ] [MainThread]: warehouse: AIRSTAT_WH +16:15:26.317171 [info ] [MainThread]: role: TRANSFORM +16:15:26.317508 [info ] [MainThread]: schema: DEV +16:15:26.317848 [info ] [MainThread]: authenticator: None +16:15:26.318147 [info ] [MainThread]: oauth_client_id: None +16:15:26.318438 [info ] [MainThread]: query_tag: None +16:15:26.318733 [info ] [MainThread]: client_session_keep_alive: False +16:15:26.319032 [info ] [MainThread]: host: None +16:15:26.319369 [info ] [MainThread]: port: None +16:15:26.319716 [info ] [MainThread]: proxy_host: None +16:15:26.320018 [info ] [MainThread]: proxy_port: None +16:15:26.320335 [info ] [MainThread]: protocol: None +16:15:26.320683 [info ] [MainThread]: connect_retries: 1 +16:15:26.321048 [info ] [MainThread]: connect_timeout: None +16:15:26.321394 [info ] [MainThread]: retry_on_database_errors: False +16:15:26.321728 [info ] [MainThread]: retry_all: False +16:15:26.322027 [info ] [MainThread]: insecure_mode: False +16:15:26.322328 [info ] [MainThread]: reuse_connections: True +16:15:26.322637 [info ] [MainThread]: s3_stage_vpce_dns_name: None +16:15:26.322933 [info ] [MainThread]: platform_detection_timeout_seconds: 0.0 +16:15:26.323496 [info ] [MainThread]: Registered adapter: snowflake=1.11.1 +16:15:26.818597 [debug] [MainThread]: Acquiring new snowflake connection 'debug' +16:15:27.039343 [debug] [MainThread]: Using snowflake connection "debug" +16:15:27.039705 [debug] [MainThread]: On debug: select 1 as id +16:15:27.039941 [debug] [MainThread]: Opening a new connection, currently in state init +16:15:37.638207 [debug] [MainThread]: Snowflake adapter: Error running SQL: select 1 as id +16:15:37.638627 [debug] [MainThread]: Snowflake adapter: Rolling back transaction. +16:15:37.638951 [info ] [MainThread]: Connection test: [ERROR] + +16:15:37.639370 [info ] [MainThread]: 1 check failed: +16:15:37.639796 [info ] [MainThread]: dbt was unable to connect to the specified database. +The database returned the following error: + + >Database Error + 250001: Could not connect to Snowflake backend after 2 attempt(s).Aborting + +Check your database credentials and try again. For more information, visit: +https://docs.getdbt.com/docs/configure-your-profile + + +16:15:37.640944 [debug] [MainThread]: Command `dbt debug` failed at 16:15:37.640824 after 12.50 seconds +16:15:37.641227 [debug] [MainThread]: Connection 'debug' was left open. +16:15:37.641470 [debug] [MainThread]: On debug: No close available on handle +16:15:37.641731 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [, , ]} +16:15:37.642060 [debug] [MainThread]: Flushing usage events +16:15:38.867576 [debug] [MainThread]: An error was encountered while trying to flush usage events +16:18:17.504988 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [, , ]} + + +============================== 16:18:17.509770 | 89d5ce91-0681-4cc1-8b75-f0673cedc157 ============================== +16:18:17.509770 [info ] [MainThread]: Running with dbt=1.11.2 +16:18:17.510363 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'target_path': 'None', 'printer_width': '80', 'write_json': 'True', 'empty': 'None', 'log_cache_events': 'False', 'introspect': 'True', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\Users\\YASH\\Desktop\\dbt_project\\dbt-capstone-project\\airstats', 'invocation_command': 'dbt debug', 'use_colors': 'True', 'indirect_selection': 'eager', 'use_experimental_parser': 'False', 'log_path': 'C:\\Users\\YASH\\Desktop\\dbt_project\\dbt-capstone-project\\airstats\\logs'} +16:18:17.532887 [info ] [MainThread]: dbt version: 1.11.2 +16:18:17.533382 [info ] [MainThread]: python version: 3.13.13 +16:18:17.533757 [info ] [MainThread]: python path: C:\Users\YASH\Desktop\dbt_project\dbt-capstone-project\.venv\Scripts\python.exe +16:18:17.534118 [info ] [MainThread]: os info: Windows-11-10.0.26200-SP0 +16:18:18.003005 [debug] [MainThread]: Snowflake adapter: Setting snowflake.connector to ERROR (file logging only) +16:18:18.003439 [debug] [MainThread]: Snowflake adapter: Setting botocore to ERROR (file logging only) +16:18:18.003718 [debug] [MainThread]: Snowflake adapter: Setting boto3 to ERROR (file logging only) +16:18:18.059805 [info ] [MainThread]: Using profiles dir at C:\Users\YASH\Desktop\dbt_project\dbt-capstone-project\airstats +16:18:18.060380 [info ] [MainThread]: Using profiles.yml file at C:\Users\YASH\Desktop\dbt_project\dbt-capstone-project\airstats\profiles.yml +16:18:18.060880 [info ] [MainThread]: Using dbt_project.yml file at C:\Users\YASH\Desktop\dbt_project\dbt-capstone-project\airstats\dbt_project.yml +16:18:18.062064 [info ] [MainThread]: adapter type: snowflake +16:18:18.062429 [info ] [MainThread]: adapter version: 1.11.1 +16:18:18.151058 [info ] [MainThread]: Configuration: +16:18:18.151624 [info ] [MainThread]: profiles.yml file [OK found and valid] +16:18:18.152069 [info ] [MainThread]: dbt_project.yml file [OK found and valid] +16:18:18.152414 [info ] [MainThread]: Required dependencies: +16:18:18.152733 [debug] [MainThread]: Executing "git --help" +16:18:18.198514 [debug] [MainThread]: STDOUT: "b"usage: git [-v | --version] [-h | --help] [-C ] [-c =]\n [--exec-path[=]] [--html-path] [--man-path] [--info-path]\n [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]\n [--git-dir=] [--work-tree=] [--namespace=]\n [--super-prefix=] [--config-env==]\n []\n\nThese are common Git commands used in various situations:\n\nstart a working area (see also: git help tutorial)\n clone Clone a repository into a new directory\n init Create an empty Git repository or reinitialize an existing one\n\nwork on the current change (see also: git help everyday)\n add Add file contents to the index\n mv Move or rename a file, a directory, or a symlink\n restore Restore working tree files\n rm Remove files from the working tree and from the index\n\nexamine the history and state (see also: git help revisions)\n bisect Use binary search to find the commit that introduced a bug\n diff Show changes between commits, commit and working tree, etc\n grep Print lines matching a pattern\n log Show commit logs\n show Show various types of objects\n status Show the working tree status\n\ngrow, mark and tweak your common history\n branch List, create, or delete branches\n commit Record changes to the repository\n merge Join two or more development histories together\n rebase Reapply commits on top of another base tip\n reset Reset current HEAD to the specified state\n switch Switch branches\n tag Create, list, delete or verify a tag object signed with GPG\n\ncollaborate (see also: git help workflows)\n fetch Download objects and refs from another repository\n pull Fetch from and integrate with another repository or a local branch\n push Update remote refs along with associated objects\n\n'git help -a' and 'git help -g' list available subcommands and some\nconcept guides. See 'git help ' or 'git help '\nto read about a specific subcommand or concept.\nSee 'git help git' for an overview of the system.\n"" +16:18:18.198967 [debug] [MainThread]: STDERR: "b''" +16:18:18.199316 [info ] [MainThread]: - git [OK found] + +16:18:18.199705 [info ] [MainThread]: Connection: +16:18:18.200107 [info ] [MainThread]: account: mmsarnl-np16286 +16:18:18.200468 [info ] [MainThread]: user: YB5015 +16:18:18.200759 [info ] [MainThread]: database: AIRSTATS +16:18:18.201041 [info ] [MainThread]: warehouse: AIRSTAT_WH +16:18:18.201325 [info ] [MainThread]: role: TRANSFORM +16:18:18.201630 [info ] [MainThread]: schema: DEV +16:18:18.201996 [info ] [MainThread]: authenticator: None +16:18:18.202364 [info ] [MainThread]: oauth_client_id: None +16:18:18.202745 [info ] [MainThread]: query_tag: None +16:18:18.203132 [info ] [MainThread]: client_session_keep_alive: False +16:18:18.203472 [info ] [MainThread]: host: None +16:18:18.203873 [info ] [MainThread]: port: None +16:18:18.204225 [info ] [MainThread]: proxy_host: None +16:18:18.204528 [info ] [MainThread]: proxy_port: None +16:18:18.204891 [info ] [MainThread]: protocol: None +16:18:18.205240 [info ] [MainThread]: connect_retries: 1 +16:18:18.205615 [info ] [MainThread]: connect_timeout: None +16:18:18.205962 [info ] [MainThread]: retry_on_database_errors: False +16:18:18.206318 [info ] [MainThread]: retry_all: False +16:18:18.206640 [info ] [MainThread]: insecure_mode: False +16:18:18.206944 [info ] [MainThread]: reuse_connections: True +16:18:18.207236 [info ] [MainThread]: s3_stage_vpce_dns_name: None +16:18:18.207534 [info ] [MainThread]: platform_detection_timeout_seconds: 0.0 +16:18:18.208095 [info ] [MainThread]: Registered adapter: snowflake=1.11.1 +16:18:18.666334 [debug] [MainThread]: Acquiring new snowflake connection 'debug' +16:18:18.760483 [debug] [MainThread]: Using snowflake connection "debug" +16:18:18.760844 [debug] [MainThread]: On debug: select 1 as id +16:18:18.761079 [debug] [MainThread]: Opening a new connection, currently in state init +16:18:19.587188 [debug] [MainThread]: Snowflake adapter: Error running SQL: select 1 as id +16:18:19.587585 [debug] [MainThread]: Snowflake adapter: Rolling back transaction. +16:18:19.587916 [info ] [MainThread]: Connection test: [ERROR] + +16:18:19.588419 [info ] [MainThread]: 1 check failed: +16:18:19.588909 [info ] [MainThread]: dbt was unable to connect to the specified database. +The database returned the following error: + + >Database Error + 250001 (08001): Failed to connect to DB: mmsarnl-np16286.snowflakecomputing.com:443. Role 'TRANSFORM' specified in the connect string is not granted to this user, or is not permitted for the credentials being used. Contact your local system administrator, or attempt to login with another role, e.g. PUBLIC. + +Check your database credentials and try again. For more information, visit: +https://docs.getdbt.com/docs/configure-your-profile + + +16:18:19.590105 [debug] [MainThread]: Command `dbt debug` failed at 16:18:19.589982 after 2.21 seconds +16:18:19.590426 [debug] [MainThread]: Connection 'debug' was left open. +16:18:19.590707 [debug] [MainThread]: On debug: No close available on handle +16:18:19.591009 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [, , ]} +16:18:19.591372 [debug] [MainThread]: Flushing usage events +16:18:21.617996 [debug] [MainThread]: An error was encountered while trying to flush usage events +16:22:03.213232 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [, , ]} + + +============================== 16:22:03.219724 | a542921d-f393-4685-a222-e0fe798449b6 ============================== +16:22:03.219724 [info ] [MainThread]: Running with dbt=1.11.2 +16:22:03.220588 [debug] [MainThread]: running dbt with arguments {'static_parser': 'True', 'no_print': 'None', 'version_check': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptionsV2(error=[], warn=[], silence=[])', 'printer_width': '80', 'write_json': 'True', 'introspect': 'True', 'log_cache_events': 'False', 'empty': 'None', 'cache_selected_only': 'False', 'fail_fast': 'False', 'debug': 'False', 'log_format': 'default', 'partial_parse': 'True', 'send_anonymous_usage_stats': 'True', 'quiet': 'False', 'warn_error': 'None', 'profiles_dir': 'C:\\Users\\YASH\\Desktop\\dbt_project\\dbt-capstone-project\\airstats', 'indirect_selection': 'eager', 'use_colors': 'True', 'invocation_command': 'dbt debug', 'use_experimental_parser': 'False', 'log_path': 'C:\\Users\\YASH\\Desktop\\dbt_project\\dbt-capstone-project\\airstats\\logs'} +16:22:03.248617 [info ] [MainThread]: dbt version: 1.11.2 +16:22:03.249179 [info ] [MainThread]: python version: 3.13.13 +16:22:03.249602 [info ] [MainThread]: python path: C:\Users\YASH\Desktop\dbt_project\dbt-capstone-project\.venv\Scripts\python.exe +16:22:03.250014 [info ] [MainThread]: os info: Windows-11-10.0.26200-SP0 +16:22:03.870152 [debug] [MainThread]: Snowflake adapter: Setting snowflake.connector to ERROR (file logging only) +16:22:03.870635 [debug] [MainThread]: Snowflake adapter: Setting botocore to ERROR (file logging only) +16:22:03.870915 [debug] [MainThread]: Snowflake adapter: Setting boto3 to ERROR (file logging only) +16:22:03.930661 [info ] [MainThread]: Using profiles dir at C:\Users\YASH\Desktop\dbt_project\dbt-capstone-project\airstats +16:22:03.931546 [info ] [MainThread]: Using profiles.yml file at C:\Users\YASH\Desktop\dbt_project\dbt-capstone-project\airstats\profiles.yml +16:22:03.932225 [info ] [MainThread]: Using dbt_project.yml file at C:\Users\YASH\Desktop\dbt_project\dbt-capstone-project\airstats\dbt_project.yml +16:22:03.934028 [info ] [MainThread]: adapter type: snowflake +16:22:03.934486 [info ] [MainThread]: adapter version: 1.11.1 +16:22:04.025192 [info ] [MainThread]: Configuration: +16:22:04.025741 [info ] [MainThread]: profiles.yml file [OK found and valid] +16:22:04.026404 [info ] [MainThread]: dbt_project.yml file [OK found and valid] +16:22:04.026969 [info ] [MainThread]: Required dependencies: +16:22:04.027340 [debug] [MainThread]: Executing "git --help" +16:22:04.075443 [debug] [MainThread]: STDOUT: "b"usage: git [-v | --version] [-h | --help] [-C ] [-c =]\n [--exec-path[=]] [--html-path] [--man-path] [--info-path]\n [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]\n [--git-dir=] [--work-tree=] [--namespace=]\n [--super-prefix=] [--config-env==]\n []\n\nThese are common Git commands used in various situations:\n\nstart a working area (see also: git help tutorial)\n clone Clone a repository into a new directory\n init Create an empty Git repository or reinitialize an existing one\n\nwork on the current change (see also: git help everyday)\n add Add file contents to the index\n mv Move or rename a file, a directory, or a symlink\n restore Restore working tree files\n rm Remove files from the working tree and from the index\n\nexamine the history and state (see also: git help revisions)\n bisect Use binary search to find the commit that introduced a bug\n diff Show changes between commits, commit and working tree, etc\n grep Print lines matching a pattern\n log Show commit logs\n show Show various types of objects\n status Show the working tree status\n\ngrow, mark and tweak your common history\n branch List, create, or delete branches\n commit Record changes to the repository\n merge Join two or more development histories together\n rebase Reapply commits on top of another base tip\n reset Reset current HEAD to the specified state\n switch Switch branches\n tag Create, list, delete or verify a tag object signed with GPG\n\ncollaborate (see also: git help workflows)\n fetch Download objects and refs from another repository\n pull Fetch from and integrate with another repository or a local branch\n push Update remote refs along with associated objects\n\n'git help -a' and 'git help -g' list available subcommands and some\nconcept guides. See 'git help ' or 'git help '\nto read about a specific subcommand or concept.\nSee 'git help git' for an overview of the system.\n"" +16:22:04.075958 [debug] [MainThread]: STDERR: "b''" +16:22:04.076307 [info ] [MainThread]: - git [OK found] + +16:22:04.076654 [info ] [MainThread]: Connection: +16:22:04.077046 [info ] [MainThread]: account: mmsarnl-np16286 +16:22:04.077435 [info ] [MainThread]: user: YB5015 +16:22:04.077843 [info ] [MainThread]: database: AIRSTATS +16:22:04.078197 [info ] [MainThread]: warehouse: AIRSTAT_WH +16:22:04.078520 [info ] [MainThread]: role: ANALYST_ROLE +16:22:04.078843 [info ] [MainThread]: schema: DEV +16:22:04.079143 [info ] [MainThread]: authenticator: None +16:22:04.079414 [info ] [MainThread]: oauth_client_id: None +16:22:04.079685 [info ] [MainThread]: query_tag: None +16:22:04.079962 [info ] [MainThread]: client_session_keep_alive: False +16:22:04.080237 [info ] [MainThread]: host: None +16:22:04.080502 [info ] [MainThread]: port: None +16:22:04.080767 [info ] [MainThread]: proxy_host: None +16:22:04.081043 [info ] [MainThread]: proxy_port: None +16:22:04.081320 [info ] [MainThread]: protocol: None +16:22:04.081584 [info ] [MainThread]: connect_retries: 1 +16:22:04.081848 [info ] [MainThread]: connect_timeout: None +16:22:04.082176 [info ] [MainThread]: retry_on_database_errors: False +16:22:04.082484 [info ] [MainThread]: retry_all: False +16:22:04.082851 [info ] [MainThread]: insecure_mode: False +16:22:04.083228 [info ] [MainThread]: reuse_connections: True +16:22:04.083535 [info ] [MainThread]: s3_stage_vpce_dns_name: None +16:22:04.083819 [info ] [MainThread]: platform_detection_timeout_seconds: 0.0 +16:22:04.084385 [info ] [MainThread]: Registered adapter: snowflake=1.11.1 +16:22:04.538083 [debug] [MainThread]: Acquiring new snowflake connection 'debug' +16:22:04.638367 [debug] [MainThread]: Using snowflake connection "debug" +16:22:04.638754 [debug] [MainThread]: On debug: select 1 as id +16:22:04.639041 [debug] [MainThread]: Opening a new connection, currently in state init +16:22:05.560805 [debug] [MainThread]: SQL status: SUCCESS 1 in 0.922 seconds +16:22:05.561773 [info ] [MainThread]: Connection test: [OK connection ok] + +16:22:05.562499 [info ] [MainThread]: All checks passed! +16:22:05.564286 [debug] [MainThread]: Command `dbt debug` succeeded at 16:22:05.564154 after 2.48 seconds +16:22:05.564632 [debug] [MainThread]: Connection 'debug' was left open. +16:22:05.564914 [debug] [MainThread]: On debug: Close +16:22:05.758811 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [, , ]} +16:22:05.759321 [debug] [MainThread]: Flushing usage events +16:22:07.001944 [debug] [MainThread]: An error was encountered while trying to flush usage events diff --git a/airstats/macros/.gitkeep b/airstats/macros/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/airstats/models/example/my_first_dbt_model.sql b/airstats/models/example/my_first_dbt_model.sql new file mode 100644 index 0000000..f31a12d --- /dev/null +++ b/airstats/models/example/my_first_dbt_model.sql @@ -0,0 +1,27 @@ + +/* + Welcome to your first dbt model! + Did you know that you can also configure models directly within SQL files? + This will override configurations stated in dbt_project.yml + + Try changing "table" to "view" below +*/ + +{{ config(materialized='table') }} + +with source_data as ( + + select 1 as id + union all + select null as id + +) + +select * +from source_data + +/* + Uncomment the line below to remove records with null `id` values +*/ + +-- where id is not null diff --git a/airstats/models/example/my_second_dbt_model.sql b/airstats/models/example/my_second_dbt_model.sql new file mode 100644 index 0000000..c91f879 --- /dev/null +++ b/airstats/models/example/my_second_dbt_model.sql @@ -0,0 +1,6 @@ + +-- Use the `ref` function to select from other models + +select * +from {{ ref('my_first_dbt_model') }} +where id = 1 diff --git a/airstats/models/example/schema.yml b/airstats/models/example/schema.yml new file mode 100644 index 0000000..9730b70 --- /dev/null +++ b/airstats/models/example/schema.yml @@ -0,0 +1,21 @@ + +version: 2 + +models: + - name: my_first_dbt_model + description: "A starter dbt model" + columns: + - name: id + description: "The primary key for this table" + data_tests: + - unique + - not_null + + - name: my_second_dbt_model + description: "A starter dbt model" + columns: + - name: id + description: "The primary key for this table" + data_tests: + - unique + - not_null diff --git a/airstats/profiles.yml b/airstats/profiles.yml new file mode 100644 index 0000000..8ddfd63 --- /dev/null +++ b/airstats/profiles.yml @@ -0,0 +1,13 @@ +airstats: + outputs: + dev: + type: snowflake + account: mmsarnl-np16286 + user: YB5015 + password: eEtrjS9ZbzaceNC + role: ANALYST_ROLE + warehouse: AIRSTAT_WH + database: AIRSTATS + schema: DEV + threads: 1 + target: dev diff --git a/airstats/seeds/.gitkeep b/airstats/seeds/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/airstats/snapshots/.gitkeep b/airstats/snapshots/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/airstats/tests/.gitkeep b/airstats/tests/.gitkeep new file mode 100644 index 0000000..e69de29