Skip to content

Commit

Permalink
attempted_transforms
Browse files Browse the repository at this point in the history
  • Loading branch information
laysabit committed Apr 12, 2024
1 parent 437e0f2 commit 534018e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions dags/stellar_etl_airflow/build_export_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,12 @@ def build_export_task(
if command == "export_ledger_entry_changes" or command == "export_all_history":
arguments = f"""{etl_cmd_string} && echo "{{\\"output\\": \\"{output_file}\\"}}" >> /airflow/xcom/return.json"""
else:
char = "}"
arguments = """
{0} 2>> stderr.out && cat stderr.out && echo "{{\\"output\\": \\"{1}\\",
\\"failed_transforms\\": `grep failed_transforms stderr.out | cut -d\\",\\" -f2 | cut -d\\":\\" -f2`,
\\"successful_transforms\\": `grep -oP '\\"successful_transforms\\":\K\d+' `}}" >> /airflow/xcom/return.json
\\"attempted_transforms\\": `grep attempted_transforms stderr.out | cut -d\\",\\" -f2 | cut -d\\":\\" -f2`}}" >> /airflow/xcom/return.json
""".format(
etl_cmd_string, output_file, char
etl_cmd_string, output_file
)
return KubernetesPodOperator(
service_account_name=Variable.get("k8s_service_account"),
Expand Down

0 comments on commit 534018e

Please sign in to comment.