-
Notifications
You must be signed in to change notification settings - Fork 68
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
Support ETL '$include' directive #785
Merged
Merged
Conversation
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
smgallo
added
enhancement
Enhancement of the functionality of an existing feature
Category:ETL
Extract Transform Load
labels
Jan 25, 2019
ryanrath
requested changes
Jan 25, 2019
smgallo
force-pushed
the
etl-include-directive
branch
from
January 30, 2019 20:03
61d41a3
to
e04c16b
Compare
smgallo
force-pushed
the
etl-include-directive
branch
from
January 31, 2019 02:39
e04c16b
to
6cdd6bf
Compare
plessbd
reviewed
Feb 1, 2019
@@ -0,0 +1 @@ | |||
{"reference":{"name":"resource_allocations","engine":"MyISAM","columns":[{"name":"resource","type":"varchar(40)","nullable":true}]},"include":"\"SELECT\\n name,\\n description\\nFROM modw.jobs j\\nWHERE 1;\\n\"","reference_with_subreference":{"subreference":[{"object1":"value"},{"object2":"value"}]}} |
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.
I wish this was pretty printed, but I wont hold it up cause of that ;)
plessbd
approved these changes
Feb 1, 2019
ryanrath
approved these changes
Feb 1, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Category:ETL
Extract Transform Load
enhancement
Enhancement of the functionality of an existing feature
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.
Description
Support specification of an ETL
$include
directive that will allow the contents of a file to be included directly in a JSON configuration file as a JSON-encoded string. This works similarly to the RFC-6901 JSON Pointers that we already implement and allows variables to be used in the file reference.For example, given the include file
etl_sql.d/query.sql
:And the configuration file
Generate the following JSON:
Motivation and Context
Improve readability of included complex SQL statements and general reuse.
Tests performed
Manually tested style prior to pushing. I think that using
push --force
causes the "continuous-integration/travis-ci/push" tests to fail.Types of changes
Checklist: