Skip to content

Commit

Permalink
Add comma parsing of owners to datajobs
Browse files Browse the repository at this point in the history
  • Loading branch information
eboneil authored Jul 12, 2024
1 parent 542f6c1 commit b4da933
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,12 @@ def generate_datajob(
datajob.url = f"{base_url}/taskinstance/list/?flt1_dag_id_equals={datajob.flow_urn.flow_id}&_flt_3_task_id={task.task_id}"

if capture_owner and dag.owner:
if config and config.capture_ownership_as_group:
datajob.group_owners.add(dag.owner)
else:
datajob.owners.add(dag.owner)
if config.capture_ownership_info and dag.owner:
owners = [owner.strip() for owner in dag.owner.split(",")]
if config.capture_ownership_as_group:
data_job.group_owners.update(owners)
else:
data_job.owners.update(owners)

if capture_tags and dag.tags:
datajob.tags.update(dag.tags)
Expand Down

0 comments on commit b4da933

Please sign in to comment.