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

dbt_utils.star macros bug #506

Closed
1 of 5 tasks
mc-introhive opened this issue Feb 25, 2022 · 6 comments · Fixed by #532
Closed
1 of 5 tasks

dbt_utils.star macros bug #506

mc-introhive opened this issue Feb 25, 2022 · 6 comments · Fixed by #532
Labels
bug Something isn't working good first issue

Comments

@mc-introhive
Copy link

mc-introhive commented Feb 25, 2022

Describe the bug

I created an issue in sqlfluff repo, because sqlfluff refuses to recognize dbt_utils macros. More details (steps to reproduce, expected results, actual restuls, logs, system info, etc.) can be found in sqlfluff#2712. However, it turns out when run sqlfluff lint -v, when it hits dbt_utils.star, specifically this block https://github.com/dbt-labs/dbt-utils/blob/main/macros/sql/star.sql#L11 it failed to recognize the execute flag. But it should've been recognized because sqlfluff does compile dbt projects which will trigger an execute flag to be true.

Which database are you using dbt with?

  • postgres
  • redshift
  • bigquery
  • snowflake
  • other (specify: ____________)

Are you interested in contributing the fix?

Yup :)

@mc-introhive mc-introhive added bug Something isn't working triage labels Feb 25, 2022
@joellabes
Copy link
Contributor

@mc-introhive Thanks for expressing interest in contributing a fix - I think will be as simple as changing https://github.com/dbt-labs/dbt-utils/blob/main/macros/sql/star.sql#L11 to {{ return('*') }} 👍

@mc-introhive
Copy link
Author

@mc-introhive Thanks for expressing interest in contributing a fix - I think will be as simple as changing https://github.com/dbt-labs/dbt-utils/blob/main/macros/sql/star.sql#L11 to {{ return('*') }} 👍

Haha, true, that seems quite straightforward ;) I will work on that PR, and get more into the weeds of how to contribute, build and test dbt-utils :)

@mc-introhive
Copy link
Author

Oops, I don't have permission to push branches :)

@joellabes
Copy link
Contributor

@mc-introhive you can contribute by forking the project and then opening a PR back to the main project.

If you're new to open source, I recommend using the GitHub desktop app as it will guide you through the workflow of cloning a repo with the purpose of contributing back to it. For a change of this size, you could also fork it in the web browser, change the character in the web editor, and then open a PR from the prompt after that.

Let me know if you need a bit more of a nudge in the right direction - happy to help get people set up to contribute!

@mc-introhive
Copy link
Author

Yeah, I'm quite new to the open-source contribution process, and thank you for pointing me to the right direction!

Is this what I'm supposed to do?

  1. I already forked the repo
  2. created a PR (as you can see above), but to my own forked repo
  3. After testing that and merge it into my own forked main branch, then I can click that contribute button to open up a PR for this original repo?

Am I on the right track?

Screen Shot 2022-03-10 at 15 53 57

@varun-dc
Copy link

varun-dc commented Mar 17, 2022

@mc-introhive Try this,

You may have to close your PR at mc-introhive#1 and then retry if what I suggested above doesn't work.

@joellabes joellabes linked a pull request Apr 5, 2022 that will close this issue
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants