Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Following the instructions for github actions failed (re: profile.yml) #186

Open
jmkacz opened this issue Feb 3, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@jmkacz
Copy link

jmkacz commented Feb 3, 2024

Describe the bug
Following the setup instructions from https://github.com/marketplace/actions/dbt-checkpoint, I set it up as suggested, pointing profiles.yml at an empty dev Snowflake schema. There seems to be an assumed step here that I am missing.

Here's my .pre-commit-config.yml file:

repos:
- repo: https://github.com/dbt-checkpoint/dbt-checkpoint
  rev: v1.2.0
  hooks:
  - id: dbt-compile
    args: ["--cmd-flags", "++profiles-dir", "."]
  - id: check-model-columns-have-desc
    files: ^models/mart

Here's my profiles.yml file:

dbt_amplify:
  target: ci
  outputs:
    ci:
      type: snowflake
      account: ...
      user: ...
      password: ...
      role: ...
      database: dev
      warehouse: ...
      schema: ci
      threads: 4

To Reproduce
Steps to reproduce the behavior:

  1. install pre-commit and dbt-snowflake
  2. create a .pre-commit-config.yml file
  3. create a profiles.yml file
  4. run pre-commit run --all-files
  5. dbt throws a runtime error that a certain schema doesn't exist. if you fix that it'll complain about a table not existing.
  • include sql script and/or dbt schema files.

Expected behavior
Clarity in the documentation about what is expected.

Will this only work if you point it at your production database with a readonly role?

Do you have to create a testing database that is an exact copy of production? We're using dbt cloud and only have ephemeral pr schemas.

Version:
v1.2.0

Additional context
Add any other context about the problem here.

@jmkacz jmkacz added the bug Something isn't working label Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant