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

Added supported parameter varaiable and removed Deprecated ones #134

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

naresh483
Copy link

@naresh483 naresh483 commented Jun 7, 2024

Description

Added below parameter varaiables

  • brickflow_job_id = {{job.id}} : The unique identifier assigned to the job.
  • brickflow_run_id = {{task.run_id}} : The unique identifier of the current task run.
  • brickflow_start_date = {{job.trigger.time.iso_date}} : A value based on the time (in UTC timezone) that the job run was triggered, rounded down to the closest minute for jobs with a cron schedule (Returns the date in ISO format.)
  • brickflow_start_time= {{job.trigger.time.iso_datetime}} : A value based on the time (in UTC timezone) that the job run was triggered, rounded down to the closest minute for jobs with a cron schedule (Returns the date and time in ISO format)
  • brickflow_task_retry_count= {{task.execution_count}} : The number of times the current task was run (including retries and repairs).
  • brickflow_parent_run_id= {{job.run_id}} :The unique identifier assigned to the job run.
  • brickflow_task_key = {{task.name}} : The name of the current task.

Related Issue

Motivation and Context

How Has This Been Tested?

image image image

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Signed-off-by: NARESH NALLA <[email protected]>
Signed-off-by: NARESH NALLA <[email protected]>
@naresh483
Copy link
Author

naresh483 commented Jun 7, 2024

Added below parameter varaiables

  • brickflow_job_id = {{job.id}} : The unique identifier assigned to the job.
  • brickflow_run_id = {{task.run_id}} : The unique identifier of the current task run.
  • brickflow_start_date = {{job.trigger.time.iso_date}} : A value based on the time (in UTC timezone) that the job run was triggered, rounded down to the closest minute for jobs with a cron schedule (Returns the date in ISO format.)
  • brickflow_start_time= {{job.trigger.time.iso_datetime}} : A value based on the time (in UTC timezone) that the job run was triggered, rounded down to the closest minute for jobs with a cron schedule (Returns the date and time in ISO format)
  • brickflow_task_retry_count= {{task.execution_count}} : The number of times the current task was run (including retries and repairs).
  • brickflow_parent_run_id= {{job.run_id}} :The unique identifier assigned to the job run.
  • brickflow_task_key = {{task.name}} : The name of the current task.

# 2 braces to escape for 1
return {i.value: f"{{{{{i.name}}}}}" for i in BrickflowBuiltInTaskVariables}
mapping = {
"brickflow_job_id": "{{job.id}}",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we not just change the BrickflowBuiltInTaskVariables class to something like below and make changes accordingly? This will avoid maintaining the mapping at both places

class BrickflowBuiltInTaskVariables(Enum):
    # key is the {{ }} and value is the key
    brickflow_job_id = "{{job.id}}"
    brickflow_run_id = "{{task.run_id}}"
    ...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@naresh483 do we need to close this pr?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants