Skip to content

[CT-1213] [Improvement] Update profiler to remove "enabled" arg #5886

@iknox-fa

Description

@iknox-fa

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

dbt.profiler is a context manager with an un-necessary "enabled" param. The CM can simply be used conditionally rather than always adding the overhead of a CM.. I.E.

if <condition>:
    with profiler(outfile=<path_to_file>):
        stuff

instead of

with profiler(enable=<conditional>, outfile=<path_to_file>):

This work should be done sometime after the API-ification effort is merged into main (or at least it's own feature branch) as this pattern makes more sense in that context.

Describe alternatives you've considered

No response

Who will this benefit?

No response

Are you interested in contributing this feature?

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood_first_issueStraightforward + self-contained changes, good for new contributors!

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions