silly-ice-4153
07/12/2022, 8:52 AMsource acryl-datahub-airflow-plugin==0.8.35.6: EntryPoint(name='acryl-datahub-airflow-plugin', value='datahub_airflow_plugin.datahub_plugin:DatahubPlugin', group='airflow.plugins')
I set also the lazy_loading to False.
I added this in a test dag
task2 = PythonOperator(
task_id='Execute_Test_Script',
python_callable=main,
dag=dag,
inlets={
"datasets": [
Dataset("postgres", "postgres.test.y"),
],
},
outlets={
"datasets": [
Dataset("postgres", "postgres.test.y"),
Dataset("postgres", "postgres.test.x"),
Dataset("postgres", "postgres.test.z")
]
},
I added also the connection datahub_rest_default to the connections. But I don't see anything in the logs that it is emitting data. Has someone an idea what could be wrong?careful-pilot-86309
07/13/2022, 3:52 AMsilly-ice-4153
07/14/2022, 5:27 PMdazzling-judge-80093
07/20/2022, 7:55 AMinlets=[
Dataset("postgres", "postgres.test.y"),
],
outlets=[
Dataset("postgres", "postgres.test.y"),
Dataset("postgres", "postgres.test.x"),
Dataset("postgres", "postgres.test.z")
]dazzling-judge-80093
07/20/2022, 7:55 AMsilly-ice-4153
07/20/2022, 8:26 AMdazzling-judge-80093
07/20/2022, 8:29 AMsilly-ice-4153
07/20/2022, 8:44 AM[core]
core.lazy_load_plugins = false
[datahub]
graceful_exceptions = falsedazzling-judge-80093
07/20/2022, 8:46 AMsilly-ice-4153
07/20/2022, 9:26 AM"""Lineage Backend
An example DAG demonstrating the usage of DataHub's Airflow lineage backend.
"""
from datetime import timedelta
from airflow import DAG
from airflow.utils.dates import days_ago
try:
from airflow.operators.bash import BashOperator
except ModuleNotFoundError:
from airflow.operators.bash_operator import BashOperator
from datahub_provider.entities import Dataset
default_args = {
"owner": "airflow",
"depends_on_past": False,
"email": ["<mailto:jdoe@example.com|jdoe@example.com>"],
"email_on_failure": False,
"execution_timeout": timedelta(minutes=5),
}
with DAG(
"datahub_lineage_backend_demo",
default_args=default_args,
description="An example DAG demonstrating the usage of DataHub's Airflow lineage backend.",
schedule_interval=timedelta(days=1),
start_date=days_ago(2),
tags=["example_tag"],
catchup=False,
) as dag:
task1 = BashOperator(
task_id="run_data_task",
dag=dag,
bash_command="echo 'This is where you might run your data tooling.'",
inlets=[
Dataset("postgres", "postgres.zoom.events"),
],
outlets=[
Dataset("postgres", "postgres.zoom.events"),
]
)
task1silly-ice-4153
07/20/2022, 9:27 AMdazzling-judge-80093
07/20/2022, 9:27 AMsilly-ice-4153
07/20/2022, 9:31 AMsilly-ice-4153
07/20/2022, 9:33 AM*** Reading local file: /opt/airflow/logs/datahub_lineage_backend_demo/run_data_task/2022-07-20T08:40:48.535939+00:00/1.log
[2022-07-20 08:40:49,721] {taskinstance.py:896} INFO - Dependencies all met for <TaskInstance: datahub_lineage_backend_demo.run_data_task 2022-07-20T08:40:48.535939+00:00 [queued]>
[2022-07-20 08:40:49,740] {taskinstance.py:896} INFO - Dependencies all met for <TaskInstance: datahub_lineage_backend_demo.run_data_task 2022-07-20T08:40:48.535939+00:00 [queued]>
[2022-07-20 08:40:49,740] {taskinstance.py:1087} INFO -
--------------------------------------------------------------------------------
[2022-07-20 08:40:49,740] {taskinstance.py:1088} INFO - Starting attempt 1 of 1
[2022-07-20 08:40:49,740] {taskinstance.py:1089} INFO -
--------------------------------------------------------------------------------
[2022-07-20 08:40:49,748] {taskinstance.py:1107} INFO - Executing <Task(BashOperator): run_data_task> on 2022-07-20T08:40:48.535939+00:00
[2022-07-20 08:40:49,754] {standard_task_runner.py:52} INFO - Started process 706 to run task
[2022-07-20 08:40:49,761] {standard_task_runner.py:76} INFO - Running: ['***', 'tasks', 'run', 'datahub_lineage_backend_demo', 'run_data_task', '2022-07-20T08:40:48.535939+00:00', '--job-id', '6423', '--pool', 'default_pool', '--raw', '--subdir', 'DAGS_FOLDER/lineage_test2.py', '--cfg-path', '/tmp/tmpje5rphow', '--error-file', '/tmp/tmp8s4zy_p_']
[2022-07-20 08:40:49,763] {standard_task_runner.py:77} INFO - Job 6423: Subtask run_data_task
[2022-07-20 08:40:49,835] {logging_mixin.py:104} INFO - Running <TaskInstance: datahub_lineage_backend_demo.run_data_task 2022-07-20T08:40:48.535939+00:00 [running]> on host efd30bf238e6
[2022-07-20 08:40:49,924] {taskinstance.py:1300} INFO - Exporting the following env vars:
AIRFLOW_CTX_DAG_EMAIL=jdoe@example.com
AIRFLOW_CTX_DAG_OWNER=***
AIRFLOW_CTX_DAG_ID=datahub_lineage_backend_demo
AIRFLOW_CTX_TASK_ID=run_data_task
AIRFLOW_CTX_EXECUTION_DATE=2022-07-20T08:40:48.535939+00:00
AIRFLOW_CTX_DAG_RUN_ID=manual__2022-07-20T08:40:48.535939+00:00
[2022-07-20 08:40:49,940] {subprocess.py:52} INFO - Tmp dir root location:
/tmp
[2022-07-20 08:40:49,940] {subprocess.py:63} INFO - Running command: ['bash', '-c', "echo 'This is where you might run your data tooling.'"]
[2022-07-20 08:40:49,951] {subprocess.py:74} INFO - Output:
[2022-07-20 08:40:49,953] {subprocess.py:78} INFO - This is where you might run your data tooling.
[2022-07-20 08:40:49,953] {subprocess.py:82} INFO - Command exited with return code 0
[2022-07-20 08:40:50,046] {taskinstance.py:1204} INFO - Marking task as SUCCESS. dag_id=datahub_lineage_backend_demo, task_id=run_data_task, execution_date=20220720T084048, start_date=20220720T084049, end_date=20220720T084050
[2022-07-20 08:40:50,083] {taskinstance.py:1265} INFO - 0 downstream tasks scheduled from follow-on schedule check
[2022-07-20 08:40:50,091] {local_task_job.py:149} INFO - Task exited with return code 0silly-ice-4153
07/20/2022, 9:34 AMdazzling-judge-80093
07/20/2022, 9:36 AM[core]
lazy_load_plugins = falsedazzling-judge-80093
07/20/2022, 9:37 AM[core] defines itsilly-ice-4153
07/20/2022, 9:42 AMdazzling-judge-80093
07/20/2022, 9:43 AMsilly-ice-4153
07/20/2022, 9:44 AMdazzling-judge-80093
07/20/2022, 9:46 AMsilly-ice-4153
07/20/2022, 9:46 AMdazzling-judge-80093
07/20/2022, 9:49 AMsilly-ice-4153
07/20/2022, 9:54 AMdazzling-judge-80093
07/20/2022, 9:55 AMsilly-ice-4153
07/20/2022, 10:16 AMsilly-ice-4153
07/20/2022, 10:17 AM