Skip to content
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

[CT-2736] [Feature] Add thread_id context var #7941

Closed
3 tasks done
NiallRees opened this issue Jun 24, 2023 · 0 comments · Fixed by #7942
Closed
3 tasks done

[CT-2736] [Feature] Add thread_id context var #7941

NiallRees opened this issue Jun 24, 2023 · 0 comments · Fixed by #7942
Labels
enhancement New feature or request

Comments

@NiallRees
Copy link
Contributor

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

Add a thread_id context var for auditing purposes

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

@NiallRees NiallRees added enhancement New feature or request triage labels Jun 24, 2023
@github-actions github-actions bot changed the title [Feature] Add thread_id context var [CT-2736] [Feature] Add thread_id context var Jun 24, 2023
@dbeatty10 dbeatty10 removed the triage label Jun 24, 2023
dbeatty10 added a commit to dbt-labs/docs.getdbt.com that referenced this issue Jul 14, 2023
resolves #3614


[Preview](https://deploy-preview-3729--docs-getdbt-com.netlify.app/reference/dbt-jinja-functions/thread_id)

## What are you changing in this pull request and why?

dbt-labs/dbt-core#7942 /
dbt-labs/dbt-core#7941

This new `thread_id` context variable works in query tags because it's
set by the (Python) worker thread.

### Utility

[Comment](dbt-labs/dbt-core#7942 (comment)):
> @NiallRees you're my hero.
> 
> https://getdbt.slack.com/archives/C2JRRQDTL/p1656203829761049

## 🎩 

<img width="700" alt="image"
src="https://github.com/dbt-labs/docs.getdbt.com/assets/44704949/11ab64e8-f257-4981-b072-aac0b7b434ed">

## Checklist
- [x] Add versioning components, as described in [Versioning
Docs](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-entire-pages)
- [ ] Add a note to the prerelease version [Migration
Guide](https://github.com/dbt-labs/docs.getdbt.com/tree/current/website/docs/guides/migration/versions)
- [x] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
and [About
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
so my content adheres to these guidelines.
- [ ] Confirm that the bullet points are actually true
- [x] ~Add page to `website/sidebars.js`~ didn't do this because it
appeared unecessary
- [x] Provide a unique filename for the new page

---------

Co-authored-by: mirnawong1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants