{"id":29029142,"url":"https://github.com/camilajaviera91/dbt-transformations-sql-mock-data","last_synced_at":"2026-02-02T12:33:58.057Z","repository":{"id":289177605,"uuid":"970374291","full_name":"CamilaJaviera91/dbt-transformations-sql-mock-data","owner":"CamilaJaviera91","description":"This repository contains the transformations and documentation for the data model generated in sql-mock-data.","archived":false,"fork":false,"pushed_at":"2025-04-28T03:33:02.000Z","size":402,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-26T08:05:37.272Z","etag":null,"topics":["data","dbt","postgresql","sql"],"latest_commit_sha":null,"homepage":"","language":"Python","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/CamilaJaviera91.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,"zenodo":null}},"created_at":"2025-04-21T23:20:04.000Z","updated_at":"2025-04-28T17:37:13.000Z","dependencies_parsed_at":"2025-04-22T00:35:45.892Z","dependency_job_id":null,"html_url":"https://github.com/CamilaJaviera91/dbt-transformations-sql-mock-data","commit_stats":null,"previous_names":["camilajaviera91/camilajaviera91-dbt-transformations-sql-mock"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CamilaJaviera91/dbt-transformations-sql-mock-data","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CamilaJaviera91%2Fdbt-transformations-sql-mock-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CamilaJaviera91%2Fdbt-transformations-sql-mock-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CamilaJaviera91%2Fdbt-transformations-sql-mock-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CamilaJaviera91%2Fdbt-transformations-sql-mock-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CamilaJaviera91","download_url":"https://codeload.github.com/CamilaJaviera91/dbt-transformations-sql-mock-data/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CamilaJaviera91%2Fdbt-transformations-sql-mock-data/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29012618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T10:37:29.253Z","status":"ssl_error","status_checked_at":"2026-02-02T10:37:28.644Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","dbt","postgresql","sql"],"created_at":"2025-06-26T08:05:36.281Z","updated_at":"2026-02-02T12:33:58.042Z","avatar_url":"https://github.com/CamilaJaviera91.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dbt Transformations for SQL Mock Data\n\n## Introduction\n\nThis repository contains the transformations and documentation for the data model generated in [sql-mock-data](https://github.com/CamilaJaviera91/sql-mock-data).\n\n## ✅ Step-by-Step Setup\n\n### Step 1: Create a New Repository\n\nCreate a new GitHub repository. For this guide, we'll name it.\n\n```\ndbt-transformations-sql-mock\n```\n\n- **💡 You can create it directly on GitHub.**\n\n---\n\n### Step 2: Clone the Repository Locally\n\n```\ngit clone git@github.com:YOUR-USER/dbt-transformations-sql-mock-data.git\ncd path/to/dbt-transformations-sql-mock-data\n```\n\n---\n\n### Step 3: Initialize the DBT Project\n\n```\ndbt init transformations\n```\n\n- **⚠️ Make sure Python and DBT are installed before running this command.**\n\n    #### Ⅰ. Install Python and pip (if you don't have them)\n\n    - DBT runs on Python. Fedora already includes Python, but make sure you have pip installed.\n\n    \u003cbr\u003e\n\n    ```\n    sudo dnf install python3-pip\n    ```\n\n    - Verify it's working.\n\n    \u003cbr\u003e\n\n    ```\n    python3 --version\n    pip3 --version\n    ```\n\n    #### Ⅱ. (Optional but recommended) Create a virtual environment. This helps keep your environment clean:\n\n    ```\n    python3 -m venv venv\n    source venv/bin/activate\n    ```\n\n    #### Ⅲ. Install DBT\n\n    - For BigQuery.\n\n    \u003cbr\u003e\n    \n    ```\n    pip install dbt-bigquery\n    ```\n\n    - For PostgreSQL.\n\n    \u003cbr\u003e\n    \n    ```\n    pip install dbt-postgres\n    ```\n\n    #### Ⅳ. Initialize your project\n    \n    ```\n    dbt init transformations\n    ```\n\n    - DBT will ask you a few questions:\n\n        - project name: (you can keep transformations)\n\n        - profile: use the default one, or configure it later\n\n    - This will create a transformations/ folder with all the base files.\n\n    #### Ⅴ. Verify everything is working\n\n    - Go into the project folder:\n\n    \u003cbr\u003e\n\n    ```\n    cd transformations\n    ```\n\n    - Then test your setup.\n\n    \u003cbr\u003e\n\n    ```\n    dbt debug\n    ```\n\n    - This will check if everything is ready to use DBT.\n\n---\n\n### Step 4: Recommended Project Structure\n\n```\ndbt-transformations-sql-mock-data/\n├── transformations/\n│   ├── dbt_project.yml\n│   ├── models/\n│   │   ├── staging/\n│   │   └── marts/\n│   ├── README.md\n├── requirements.txt\n└── .gitignore\n```\n\n---\n\n### Step 5: Connect to Your Data\n\nIf your other repo (`sql-mock-data`) contains scripts that load data into BigQuery or PostgreSQL, make sure this DBT project connects to the same data source.\n\n    - Use the same service account or connection parameters.\n\n    - Use the same dataset or schema, like raw_data.\n\n - **💡 Here's a template for your ~/.dbt/profiles.yml with both a PostgreSQL and BigQuery example — you can keep whichever you need, or even include both under different profile names.**\n\n#### 🐘 PostgreSQL (Docker example)\n\n ```\ntransformations:\n  target: dev\n  outputs:\n    dev:\n      type: postgres\n      host: 172.17.0.1         # Replace with your container's IP\n      port: 5432\n      user: postgres\n      password: yourpassword\n      dbname: employee         # Must match the name of the database\n      schema: raw_data         # Use your target schema name\n      threads: 1\n ```\n\n-  **✅ Test it with:**\n\n```\ndbt debug\n```\n\n- **💡 If you’re using localhost and pgAdmin/PostgreSQL installed outside Docker, you can try:**\n\n```\nhost: localhost\n```\n\n#### ☁️ BigQuery (Service Account)\n\n```\ntransformations:\n  target: dev\n  outputs:\n    dev:\n      type: bigquery\n      method: service-account\n      project: your-gcp-project-id\n      dataset: raw_data                # Your BigQuery dataset\n      threads: 1\n      timeout_seconds: 300\n      location: US\n      keyfile: /full/path/to/keyfile.json\n```\n\n- **✅ Replace your-gcp-project-id and keyfile with your actual GCP project and the path to your service account key.**\n\n---\n\n### Step 6: Push Your Changes\n\n```\ngit add .\ngit commit -m \"Initialize DBT project for transforming and documenting data\"\ngit push origin main\n```\n\n---\n\n## ▶️ Using the Starter Project\n\nTry running the following commands.\n\n```\ndbt run\ndbt test\n```\n\n---\n\n## 📚 Resources\n- Learn more about dbt [in the docs](https://docs.getdbt.com/docs/introduction)\n- Check out [Discourse](https://discourse.getdbt.com/) - Q\u0026A and community discussions\n- Join the [chat](https://community.getdbt.com/) on Slack for live discussions and support\n- Find [dbt events](https://events.getdbt.com) near you\n- Check out [the blog](https://blog.getdbt.com/) for the latest news on dbt's development and best practices\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamilajaviera91%2Fdbt-transformations-sql-mock-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcamilajaviera91%2Fdbt-transformations-sql-mock-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamilajaviera91%2Fdbt-transformations-sql-mock-data/lists"}