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

don't permit multiple models with the same name #527

Closed
drewbanin opened this issue Sep 14, 2017 · 4 comments
Closed

don't permit multiple models with the same name #527

drewbanin opened this issue Sep 14, 2017 · 4 comments
Labels
bug Something isn't working good_first_issue Straightforward + self-contained changes, good for new contributors!
Milestone

Comments

@drewbanin
Copy link
Contributor

drewbanin commented Sep 14, 2017

  • at most one enabled model can occupy a given model name in a run
@drewbanin drewbanin added the bug Something isn't working label Sep 14, 2017
@drewbanin drewbanin added the good_first_issue Straightforward + self-contained changes, good for new contributors! label Sep 29, 2017
@drewbanin
Copy link
Contributor Author

drewbanin commented Sep 29, 2017

We can add a check for duplicate models here. If there are duplicated model names, we should raise a compiler error

@mturzanska
Copy link
Contributor

I could work on this one over the weekend. Anyone working on it already / any blockers ?

@drewbanin
Copy link
Contributor Author

drewbanin commented Oct 12, 2017

@mturzanska nope, no one is working on this, but @jthandy and I just encountered it again today :)

The only catch is that multiple models can exist with the same name, but only one of them can be enabled. Each node adheres to this contract.

It would be great to write a descriptive error message out to the user. Something like Error: model 'events' is duplicated works, but something like:

Error:
Found 2 models with the same name:
 - in package snowplow, models/base/events.sql
 - in package stripe: models/transformed/events.sql

(or similar) would be really great! New error functions can be created here.

Let me know if there's anything I can do to help!

@drewbanin
Copy link
Contributor Author

This is going out in 0.9.1

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 Straightforward + self-contained changes, good for new contributors!
Projects
None yet
Development

No branches or pull requests

2 participants