Skip to content

Commit

Permalink
feat: Added more logs for better tracebility of work!
Browse files Browse the repository at this point in the history
  • Loading branch information
amindadgar committed Aug 7, 2024
1 parent 4205aa9 commit 76e76cc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dags/discourse_analyzer_etl.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,12 @@ def discourse_etl_raw_data(
transformed_data = transformer.transform(
raw_data=extracted_data,
)

loader = LoadTransformedData(platform_id=platform_id)
loader.load(processed_data=transformed_data, recompute=recompute)
if len(transformed_data) != 0:
logging.info(f"Loading {len(transformed_data)} transformed document in db!")
loader = LoadTransformedData(platform_id=platform_id)
loader.load(processed_data=transformed_data, recompute=recompute)
else:
logging.warning("No new document to load for discourse!")

@task
def discourse_etl_raw_members(
Expand Down

0 comments on commit 76e76cc

Please sign in to comment.