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

Flagging duplicate macros #1891

Closed
amychen1776 opened this issue Nov 5, 2019 · 2 comments
Closed

Flagging duplicate macros #1891

amychen1776 opened this issue Nov 5, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@amychen1776
Copy link

Describe the feature

Requesting for dbt to provide an error message when there are macros with the same name.

Describe alternatives you've considered

N/A

Additional context

This isn't database specific.

Who will this benefit?

My use case was that I was fixing a macro and copied and pasted it to another file. I forgot to delete the incorrect macro of the same name when I was done. When the model called for the macro, it actually just pulled in the old version of the macro. This is just a suggestion of idiot proofing things that can be missed.

@amychen1776 amychen1776 added enhancement New feature or request triage labels Nov 5, 2019
@drewbanin drewbanin removed the triage label Nov 5, 2019
@drewbanin drewbanin added this to the 0.15.2 milestone Nov 5, 2019
@drewbanin
Copy link
Contributor

This is a great suggestion - I just ran into this today too.

dbt allows you to override macros from an imported package (like how you can override generate_schema_name, for instance). I think we want to make sure that there aren't two macros with the same name in the same package. I don't believe there's ever a reasonable use case for that.

Thanks!

beckjake added a commit that referenced this issue Jan 16, 2020
@beckjake
Copy link
Contributor

Fixed in #2045

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants