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

Typo in config files / entrypoint.sh #15

Merged
merged 1 commit into from
Feb 3, 2022
Merged

Typo in config files / entrypoint.sh #15

merged 1 commit into from
Feb 3, 2022

Conversation

mycaule
Copy link
Contributor

@mycaule mycaule commented Oct 26, 2021

I guess profiles.yml is the standard dbt config file, but datab.yml is for Databricks.
Thanks for your github action.

@mwhitaker
Copy link
Owner

I am really sorry about the belated reply to your pull request.

I don't see any reference that profiles.yml needs to be renamed. See Databricks and dbt docs. Is the dbt action not working for you? If so, please provide more detail about any errors or why you suggest the renaming.

@mycaule
Copy link
Contributor Author

mycaule commented Feb 1, 2022

Yes it is not working right now, I basically had to add an artifical step to make it work.

Supposing profiles.yml is already present in your dbt project folder,

      - name: File hack
        working-directory: data-warehouse/dbt/
        run: |
            # Artificial, https://github.com/mwhitaker/dbt-action/pull/15
            touch datab.yml

      # leaving user and password empty, because values are already filled from last step
      # see https://github.com/mwhitaker/dbt-action/blob/master/entrypoint.sh#L22-L33
      - name: Compile SQL
        env:
          DBT_USER: '...'
          DBT_PASSWORD: '...'
        uses: mwhitaker/dbt-action@master
        with:
          dbt_command: "dbt compile --profiles-dir ."
          dbt_project_folder: "data-warehouse/dbt"

I mean just look at these lines, you are performing sed on two different files...

dbt-action/entrypoint.sh

Lines 22 to 27 in b4ba47f

elif [ -n "${DBT_USER}" ] && [ -n "$DBT_PASSWORD" ]
then
echo trying to use user/password
sed -i "s/_user_/${DBT_USER}/g" ./datab.yml
sed -i "s/_password_/${DBT_PASSWORD}/g" ./profiles.yml
elif [ -n "${DBT_TOKEN}" ]

Copy link
Owner

@mwhitaker mwhitaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks again!

@mwhitaker mwhitaker merged commit 3cc14b4 into mwhitaker:master Feb 3, 2022
@mycaule mycaule deleted the patch-1 branch February 7, 2022 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants