Skip to content

Commit

Permalink
Merge pull request #367 from coderxio/jrlegrand/dailymed_part_fix
Browse files Browse the repository at this point in the history
Jrlegrand/dailymed part fix
  • Loading branch information
jrlegrand authored Feb 14, 2025
2 parents 7b216cb + cd316cc commit e6e50f3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions airflow/dags/dailymed/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ def dailymed():
# - "dm_spl_release_human_rx_part1" for a given part
# - "dm_spl_daily_update_MMDDYYYY" for a given date
# (replace MMDDYYY with your month, day, and year)
file_set = "dm_spl_release_human_rx"
file_set = "dm_spl_release_human_rx_part"
# NOTE: without the _part at the end, it loads all 5 parts
# and then a separate zip that is all 5 combined

def connect_to_ftp_dir(ftp_str: str, dir: str):
import ftplib
Expand Down Expand Up @@ -141,7 +143,7 @@ def load():
@task
def transform():
subprocess = SubprocessHook()
result = subprocess.run_command(['dbt', 'run', '--select', 'models/staging/dailymed', 'models/intermediate/dailymed'], cwd='/dbt/sagerx')
result = subprocess.run_command(['dbt', 'run', '--select', 'models/staging/dailymed', 'models/intermediate/dailymed', 'ndcs_to_label_images'], cwd='/dbt/sagerx')
print("Result from dbt:", result)

extract() >> load() >> transform()
Expand Down

0 comments on commit e6e50f3

Please sign in to comment.