DE-8600: DBT support for all pipeline & output stream configurations #45
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.
This is a new, squashed, PR for the draft that was opened a few weeks ago. The draft was a mess with my Python skill issues.
The general idea of this PR is to change the config schema to take a partial Decodable Resource Spec for each of these objects, rather than just accepting some subset of those specs directly.
The partial spec from the config is then merged with the bits that DBT usually infers, such as the fields (inferred from the SQL), the names, etc.
Then this complete spec is sent to our new
/applyendpoint. This endpoint has a lot of improvements over our older APIs, and has exclusive access to some newer features. It also avoids the requirement of stopping jobs manually before applying updates, which simplifies the adapter code a bit, and sometimes makes for a better UX.See the http_events example to get an idea of how this would change the interface.
Note on the approach: My hope is to move the DBT adapter to being a somewhat simple layer on top of our Declarative API features. A consequence of this is that you'll see me handling the resoource specs as basically just YAML (or the python Dict representation of that YAML). This would let us add fields to the API, and have them picked up by DBT automatically without publishing a new version. The current code is not agnostic to the spec versions, so picking up new versions of our resource spec would require a new adapter version. My gut feeling was that this is a decent compromise of flexibility & convenience, but I'd love to hear from others.
We've also discussed spitting out Decodable Declarative Resource YAML from the dbt compile step. With this done, I think that amounts to basically spitting out the spec we build from this configuration. There may be some "details", but this work should serve both.
Evidence of working examples
Here's a run of the examples after this change. There's not real change to the output, but at least you can see they work. I've also tested making changes to the example configurations and ensured that the right resources are recreated as expected.