{"id":27878969,"url":"https://github.com/sajonaro/dbt-ex","last_synced_at":"2025-05-05T03:16:50.447Z","repository":{"id":271569844,"uuid":"913802410","full_name":"sajonaro/dbt-ex","owner":"sajonaro","description":"small example of how to use dbt","archived":false,"fork":false,"pushed_at":"2025-01-08T14:30:50.000Z","size":92,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-05T03:16:46.489Z","etag":null,"topics":["data-modelling","dbt","poetry","python"],"latest_commit_sha":null,"homepage":"","language":"PLpgSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sajonaro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-08T11:33:46.000Z","updated_at":"2025-01-08T14:30:55.000Z","dependencies_parsed_at":"2025-01-08T15:53:22.073Z","dependency_job_id":"233845e7-aac3-4bd3-9ac8-1e9eb12bd8ae","html_url":"https://github.com/sajonaro/dbt-ex","commit_stats":null,"previous_names":["sajonaro/dbt-ex"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajonaro%2Fdbt-ex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajonaro%2Fdbt-ex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajonaro%2Fdbt-ex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajonaro%2Fdbt-ex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sajonaro","download_url":"https://codeload.github.com/sajonaro/dbt-ex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252429968,"owners_count":21746574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-modelling","dbt","poetry","python"],"created_at":"2025-05-05T03:16:49.845Z","updated_at":"2025-05-05T03:16:50.411Z","avatar_url":"https://github.com/sajonaro.png","language":"PLpgSQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Useful scrips\n\n```bash\n#create symlink to ~./dbt/profile.yml\n$ ln -s ~/.dbt/profiles.yml profiles.yml\n```\n\n \n```bash\n# install dependencies (from .toml file)\n$ poetry install\n\n```\n\n### DBT commands (ran via poetry)\n\n```bash\n# compile = dbt run \n$ cd ex1\n$ poetry run dbt run\n\n# if dbt_project.yml settings have changed\n$ poetry run dbt run --full-refresh\n\n# to check validity of connections  = dbt debug \n$ poetry run dbt debug\n\n# run tests = dbt test\n$ poetry run dbt test\n\n\n# run seed, tests, run  in all in one command = dbt build\n$ poetry run dbt build\n```\n\n### using [DuckDB CLI](https://duckdb.org/docs/installation/?environment=cli) to check dbt results (= query output db)\n\n```bash\n# to install DuckDBCLi\n$ curl --fail --location --progress-bar --output duckdb_cli-linux-amd64.zip https://github.com/duckdb/duckdb/releases/download/v1.1.3/duckdb_cli-linux-amd64.zip \u0026\u0026 unzip duckdb_cli-linux-amd64.zip\n```\n\n```bash\n# to open persisted db (in this case ex2.duckdb)\n$ ./duckdb ex2.duckdb \n\n# to see all tables in current database (while in ./dudckb session)\nD show tables;\n\n# to export table `customers` to `customers.txt` file\nD COPY (SELECT * FROM customers) TO 'output.txt' (HEADER, DELIMITER ',');\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsajonaro%2Fdbt-ex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsajonaro%2Fdbt-ex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsajonaro%2Fdbt-ex/lists"}