Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Feature] Allow access to manifest object on macros executed during the "on-run-end" hook #11316

Open
3 tasks done
mickaelandrieu opened this issue Feb 16, 2025 · 0 comments
Open
3 tasks done
Labels
enhancement New feature or request triage

Comments

@mickaelandrieu
Copy link

mickaelandrieu commented Feb 16, 2025

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature

Hi, looking at the extras dictionnary already sent as available variables in the after_run() of RunTask class,

I'd like to see manifest object available for the following reasons :

  • regarding the current dbt_artifacts package, it's really hard to provide "test coverage" of a dbt project out of the box, enforcing us to use stale project like dbt-coverage
  • Even if we could do it, the Results object doesnt contains any information about the documentation (and I don't think you will allow a BC on that class)
  • Even if the manifest is not enough (mostly because it doesnt cover the columns not documented, which is why it would be ideal to get a catalog object ?) this will ease a lot the door to provide a "dbt" solution to start "tests & docs" coverage.

Describe alternatives you've considered

  • Using dbt-coverage and a Python script to load data into tables

Who will this benefit?

IMHO anyone as it is the job of analytics engineers to ensure the quality of their data : how can you do that when you can't even monitor a tests/docs coverage over you project ?

Are you interested in contributing this feature?

YES

Anything else?

        # run.py l.1025
        extras = {
            "schemas": list({s for _, s in database_schema_set}),
            "results": [
                r for r in results if r.thread_id != "main" or r.status == RunStatus.Error
            ],  # exclude that didn't fail to preserve backwards compatibility
            "database_schemas": list(database_schema_set),
            "manifest": self.manifest, # 1-line addition may help a lot
            "catalog": to_be_done, # this second line would be really awesome but require far more work I guess ?
        }
@mickaelandrieu mickaelandrieu added enhancement New feature or request triage labels Feb 16, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request triage
Projects
None yet
Development

No branches or pull requests

1 participant