We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correction of the DAG Example in the file: run-hop-in-apache-airflow.adoc
Indentation problem on line 27 of the DAG.
hop = DockerOperator(
Also take a new screenshot of the Airflow home screen, as it is showing a DAG syntax error.
This may hinder new users.
Another warning that a syntax error may occur.
from datetime import datetime, timedelta from airflow import DAG from airflow.operators.bash_operator import BashOperator from airflow.operators.docker_operator import DockerOperator from airflow.operators.python_operator import BranchPythonOperator from airflow.operators.dummy_operator import DummyOperator from docker.types import Mount default_args = { 'owner' : 'airflow', 'description' : 'sample-pipeline', 'depend_on_past' : False, 'start_date' : datetime(2022, 1, 1), 'email_on_failure' : False, 'email_on_retry' : False, 'retries' : 1, 'retry_delay' : timedelta(minutes=5) }
with DAG('sample-pipeline', default_args=default_args, schedule_interval=None, catchup=False, is_paused_upon_creation=False) as dag: start_dag = DummyOperator( task_id='start_dag' ) end_dag = DummyOperator( task_id='end_dag' ) hop = DockerOperator( task_id='sample-pipeline', # use the Apache Hop Docker image. Add your tags here in the default apache/hop: syntax image='apache/hop', api_version='auto', auto_remove=True, environment= { 'HOP_RUN_PARAMETERS': 'INPUT_DIR=', 'HOP_LOG_LEVEL': 'Basic', 'HOP_FILE_PATH': '${PROJECT_HOME}/transforms/null-if-basic.hpl', 'HOP_PROJECT_DIRECTORY': '/project', 'HOP_PROJECT_NAME': 'hop-airflow-sample', 'HOP_ENVIRONMENT_NAME': 'env-hop-airflow-sample.json', 'HOP_ENVIRONMENT_CONFIG_FILE_NAME_PATHS': '/project-config/env-hop-airflow-sample.json', 'HOP_RUN_CONFIG': 'local' }, docker_url="unix://var/run/docker.sock", network_mode="bridge", mounts=[Mount(source='LOCAL_PATH_TO_PROJECT_FOLDER', target='/project', type='bind'), Mount(source='LOCAL_PATH_TO_ENV_FOLDER', target='/project-config', type='bind')], force_pull=False ) start_dag >> hop >> end_dag
Priority: 3
Component: Documentation
The text was updated successfully, but these errors were encountered:
.take-issue
Sorry, something went wrong.
indentation fix, minor updates #3967 (#3977)
1b26d3e
bamaer
No branches or pull requests
What needs to happen?
Correction of the DAG Example in the file: run-hop-in-apache-airflow.adoc
Indentation problem on line 27 of the DAG.
hop = DockerOperator(
Also take a new screenshot of the Airflow home screen, as it is showing a DAG syntax error.
This may hinder new users.
Another warning that a syntax error may occur.
from datetime import datetime, timedelta
from airflow import DAG
from airflow.operators.bash_operator import BashOperator
from airflow.operators.docker_operator import DockerOperator
from airflow.operators.python_operator import BranchPythonOperator
from airflow.operators.dummy_operator import DummyOperator
from docker.types import Mount
default_args = {
'owner' : 'airflow',
'description' : 'sample-pipeline',
'depend_on_past' : False,
'start_date' : datetime(2022, 1, 1),
'email_on_failure' : False,
'email_on_retry' : False,
'retries' : 1,
'retry_delay' : timedelta(minutes=5)
}
with DAG('sample-pipeline', default_args=default_args, schedule_interval=None, catchup=False, is_paused_upon_creation=False) as dag:
start_dag = DummyOperator(
task_id='start_dag'
)
end_dag = DummyOperator(
task_id='end_dag'
)
hop = DockerOperator(
task_id='sample-pipeline',
# use the Apache Hop Docker image. Add your tags here in the default apache/hop: syntax
image='apache/hop',
api_version='auto',
auto_remove=True,
environment= {
'HOP_RUN_PARAMETERS': 'INPUT_DIR=',
'HOP_LOG_LEVEL': 'Basic',
'HOP_FILE_PATH': '${PROJECT_HOME}/transforms/null-if-basic.hpl',
'HOP_PROJECT_DIRECTORY': '/project',
'HOP_PROJECT_NAME': 'hop-airflow-sample',
'HOP_ENVIRONMENT_NAME': 'env-hop-airflow-sample.json',
'HOP_ENVIRONMENT_CONFIG_FILE_NAME_PATHS': '/project-config/env-hop-airflow-sample.json',
'HOP_RUN_CONFIG': 'local'
},
docker_url="unix://var/run/docker.sock",
network_mode="bridge",
mounts=[Mount(source='LOCAL_PATH_TO_PROJECT_FOLDER', target='/project', type='bind'), Mount(source='LOCAL_PATH_TO_ENV_FOLDER', target='/project-config', type='bind')],
force_pull=False
)
start_dag >> hop >> end_dag
Issue Priority
Priority: 3
Issue Component
Component: Documentation
The text was updated successfully, but these errors were encountered: