Ensure local docs operators generate necessary files for datahub integration#655
Ensure local docs operators generate necessary files for datahub integration#655chrishronek wants to merge 5 commits into
Conversation
👷 Deploy Preview for amazing-pothos-a3bca0 processing.
|
tatiana
left a comment
There was a problem hiding this comment.
Thanks, @chrishronek ! Very exciting to see these new operators.
I believe not only they can be useful for Datahub integration, but also with the integration to other services and tools (IIR OpenLineage also benefits from the run_results.json file).
Regarding tests, would it be worth to add a unit test related to DbtFreshnessS3LocalOperator? I noticed you added to the example DAG, which runs as part of the integration tests suite. That said, we don't have any test validating what this operator actually does.
I left some minor comments inline.
| self.base_cmd = ["docs", "generate"] | ||
|
|
||
|
|
||
| class DbtFreshnessLocalOperator(DbtLocalBaseOperator): |
There was a problem hiding this comment.
Minor comment: what do you think about renaming DbtFreshnessLocalOperator to DbtSourceFreshnessLocalOperator?
| self.base_cmd = ["source", "freshness"] | ||
|
|
||
|
|
||
| class DbtFreshnessS3LocalOperator(DbtFreshnessLocalOperator): |
There was a problem hiding this comment.
Similar here, I wonder if DbtSourceFreshnessS3LocalOperator would be more representative.
| connection_id="test_aws", | ||
| bucket_name="test_bucket", | ||
| ) | ||
|
|
There was a problem hiding this comment.
I just realised we're adding the code manually in this doc code.
WDYT if we added a reference to the example DAG, similar to what we did in:
astronomer-cosmos/docs/getting_started/execution-modes.rst
Lines 58 to 61 in 188fe56
This way, the documentation will be up-to-date if the operator changes without additional effort.
| bucket_name="test_bucket", | ||
| ) | ||
|
|
||
| generate_dbt_freshness_aws = DbtFreshnessS3Operator( |
There was a problem hiding this comment.
It may be worth to add a comment on why someone would like to send the source freshness files to S3, and perhaps a link to your blog post: https://parakeet.solutions/ingest-cosmos-dbt-into-datahub/, so people can have more
|
@chrishronek, we're starting to close stale PRs - please reopen or create a new one once you have a chance to contribute again! |
Description
Two changes with this PR:
DbtFreshnessLocalOperator&DbtFreshnessS3LocalOperatorto properly generate the sources.json fileDbtDocsLocalOperator.These files are necessary to use the dbt integration with DataHub and will make it easier for cosmos users to emit their metadata to DataHub as needed.
Checklist