{"id":27914987,"url":"https://github.com/gitlabhq/snowflake_spend","last_synced_at":"2025-08-31T20:15:11.183Z","repository":{"id":37854960,"uuid":"297778560","full_name":"gitlabhq/snowflake_spend","owner":"gitlabhq","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-29T09:24:35.000Z","size":514,"stargazers_count":29,"open_issues_count":1,"forks_count":24,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-29T09:26:39.598Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gitlabhq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2020-09-22T21:39:29.000Z","updated_at":"2025-05-29T09:24:39.000Z","dependencies_parsed_at":"2025-05-06T15:46:38.290Z","dependency_job_id":"3be1cada-42f1-4426-b06f-dad1c6cda803","html_url":"https://github.com/gitlabhq/snowflake_spend","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/gitlabhq/snowflake_spend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitlabhq%2Fsnowflake_spend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitlabhq%2Fsnowflake_spend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitlabhq%2Fsnowflake_spend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitlabhq%2Fsnowflake_spend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gitlabhq","download_url":"https://codeload.github.com/gitlabhq/snowflake_spend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitlabhq%2Fsnowflake_spend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273032934,"owners_count":25034067,"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","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-05-06T15:33:17.263Z","updated_at":"2025-08-31T20:15:11.136Z","avatar_url":"https://github.com/gitlabhq.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Snowflake Spend dbt Package\n\nThis is a [dbt](http://getdbt.com) package for understanding the cost your [Snowflake Data Warehouse](https://www.snowflake.com) is accruing.\n\nTo get started with this package, you will need to have access to the appropriate databases.\n\nTo grant appropriate roles for these tables the following command was run:\n```\nGRANT IMPORTED PRIVILEGES ON DATABASE snowflake TO ROLE \u003crole\u003e;\n```\n\n[Learn more about the appropriate permissions](https://docs.snowflake.net/manuals/user-guide/data-share-consumers.html#granting-privileges-on-a-shared-database).\n\ndbt has great [docs on package management](https://docs.getdbt.com/docs/package-management).\nWe are working to get this package on the [dbt hub site](http://hub.getdbt.com).\nIn the mean time, you can install it using the git package syntax, which the GitLab data team uses in our [`packages.yml`](https://gitlab.com/gitlab-data/analytics/blob/master/transform/snowflake-dbt/packages.yml) file\n\n```\npackages:\n  - git: https://gitlab.com/gitlab-data/snowflake_spend.git\n    revision: v1.2.0\n```\n\nYou will need to update your `dbt_project.yml` to enable this package.\nYou can see [how the GitLab data team has this configured](https://gitlab.com/gitlab-data/analytics/blob/master/transform/snowflake-dbt/dbt_project.yml).\n\n```\nsnowflake_spend:\n  enabled: true\n```\n\nYou will need a csv called `snowflake_contract_rates.csv` which has two columns: effective date and rate. The effective date is the day the new contracted rate started and it should be in YYYY-MM-DD format. The rate is the per credit price for the given time period. You can see how the data team configures [their csv file](https://gitlab.com/gitlab-data/analytics/blob/master/transform/snowflake-dbt/data/snowflake_contract_rates.csv). You will need to run `dbt seed` for the csv to be loaded as a table and for the model to run succesfully.\n\nThese models are documented and tested.\nIf you'd like to see what these look like live, you can see them in [the GitLab Data Team's public dbt docs](https://dbt.gitlabdata.com/#!/model/model.snowflake_spend.snowflake_amortized_rates).\n\nMaintainers of this projects are @m_walker and @jjstark.\nReviewers are @mpeychet_.\n\nWe include sample Sisense (formerly Periscope) dashboards in the `/analytics` folder.\n\nThis dbt package is made available by the GitLab Data Team under an MIT License.\n\n## Troubleshooting\n\n**Error: _Found duplicate project dbt_utils. This occurs when a dependency has the same project name as some other dependency._**\n\nYou are most likely referencing dbt-utils using the git/revision syntax. Use the dbt Hub package syntax instead in your `packages.yml`, eg:\n\n```\npackages:\n\n  # Avoid this\n  - git: \"https://github.com/fishtown-analytics/dbt-utils.git\"\n    revision: 0.2.1\n\n  # Use this instead\n  - package: fishtown-analytics/dbt_utils\n    version: 0.2.1\n```\n\n## How this Package Gets Released -- For Maintainers Only\n\nIn order to cut a new release of this package:\n1. Create a new tag at the commit that is to be released. Incrementing either the major version, minor version, or bug version of the previously released tag.  The new tag name should follow the pattern `v#.#.#`.  Push the tag to origin/master, if the tag is created locally.\n1. With a GitLab API-enabled private token create a new release with a command similar to this:\n\n    ```\n    curl --header 'Content-Type: application/json' --header \"PRIVATE-TOKEN: \u003cyour-private-token\u003e\" \\\n    --data '{ \"name\": \"dbt: snowflake_spend #.#.#\", \"tag_name\": \"v#.#.#\", \"description\": \"Initial tagged release\"}' \\\n    --request POST https://gitlab.com/api/v4/projects/12955687/releases\n    ```\n\n1. Update the release notes by going to your [tag](https://gitlab.com/gitlab-data/snowflake_spend/-/tags) and click on the \"edit release notes\" pencil.  The release notes should follow the same general form as the notes for v1.1.0 and include a bulleted summary of merged MRs and a thank you to contributors.\n1. Create a blog post like [this](https://about.gitlab.com/blog/2020/04/08/snowflake-spend-dbt-package-release/) with all of the details of the release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitlabhq%2Fsnowflake_spend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitlabhq%2Fsnowflake_spend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitlabhq%2Fsnowflake_spend/lists"}