-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
DAGnabit #9
Merged
DAGnabit #9
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
cccbba8
first cut
04b0d5e
wrap select stmts in create or replace (table|view)
16001d6
Merge branch 'turntable' into dagnabit
c0d5295
better parsing and drop schema before create
7649f6e
handle CTEs and window functions
ce530a7
remove debug code
fa9e4c6
fix duplicate 'view' keyword in compile stmt
d8d9e25
code cleanup
64bb3db
default to models
cf588ed
each model gets its own config
b3c19da
cleanup
1e1180a
Merge branch 'per-model-configs' into dagnabit
a90d3a1
rename compiler --> linker
79f6fb5
drop existing tables/views (instead of whole schema)
c041317
remove argparse dep
be1231a
change print statements, function calls, imports
7faac11
always cascade table drop
e762fb1
Merge pull request #14 from analyst-collective/python3-support
drewbanin 216b2f8
move linker code into run task
fa46b8e
Merge branch 'dagnabit' of github.com:analyst-collective/dbt into dag…
6e4c858
add parens to print stmt
42d500a
model configs come from dbt_project.yml file
f3a7b70
skip disabled models in compile step
0a66357
add model config docs to sample.dbt_project.yml
4bb43a4
don't use 'base' as a magic keyword
d7a2ba4
tweak example config file
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ argparse | |
Jinja2>=2.8 | ||
PyYAML>=3.11 | ||
psycopg2==2.6.1 | ||
sqlparse==0.1.19 | ||
networkx==1.11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this is expecting the model to be specified as
create view as...
orcreate table as...
and then re-writes that create statement if necessary? I see that's a convenient way to allow the user to specify the name of the thing, but I think it will either break or produce surprising results if anything other than the most generic forms forcreate table/view as...
are used. For example, what's going to happen if someone writescreate temporary table as ...
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code runs after the compilation step. Input to the system should be a SELECT statement. This is compiled to a CREATE statement, which is then run. I suppose this code is redundant, but it was originally intended to avoid running destructive SQL unintentionally
There is a single select statement per file, and the table/view name is inferred from the file name containing the SELECT statement
Sent from my iPhone
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ok, the simultaneous introduction of dependency-graphing and create-wrapping got me mixed up. That sounds right. In the future it would be good to provide that blurb when you create the PR, it's useful for understanding the approach.