Skip to content

Commit

Permalink
Merge pull request #21 from kevinsunny1996/task/scope_var_fix
Browse files Browse the repository at this point in the history
scoped out vars
  • Loading branch information
kevinsunny1996 authored May 13, 2024
2 parents a9d59ee + bc06b1f commit 98fe5e5
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions dags/rawg_api_extractor_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,15 +365,13 @@
)
def rawg_api_extractor_dag():

rawg_api_key = Variable.get('rawg_api_key')
rawg_page_number = int(Variable.get('api_page_number', default_var=1))
rawg_landing_gcs_bucket = Variable.get('gcs_rawg_api_landing_bucket')
rawg_api_bq_dataset = Variable.get('gcp_bq_dataset')
gcp_project_name = Variable.get('gcp_project_id')
@task_group(group_id='initialize_vars_and_check_hibernation')
def initialize_vars_and_check_hibernation():
# Fetch variable values for API Key and Page Number and Landing bucket URL
rawg_api_key = Variable.get('rawg_api_key')
rawg_page_number = int(Variable.get('api_page_number', default_var=1))
rawg_landing_gcs_bucket = Variable.get('gcs_rawg_api_landing_bucket')
rawg_api_bq_dataset = Variable.get('gcp_bq_dataset')
gcp_project_name = Variable.get('gcp_project_id')

# Check hibernation is close or not
@task
def check_hibernation(**context):
Expand Down

0 comments on commit 98fe5e5

Please sign in to comment.