Airflow parallelism

parallelism: not a very descriptive name. The description says it sets the maximum task instances for the airflow installation, which is a bit ambiguous — if I have two hosts running airflow workers, I’d have airflow installed on two hosts, so that should be two installations, but based on context ‘per installation’ here means ‘per … Read more

Writing to Airflow Logs

You can import the logging module into your code and write to logs that way import logging logging.info(‘Hello’) Here are some more options import logging logging.debug(‘This is a debug message’) logging.info(‘This is an info message’) logging.warning(‘This is a warning message’) logging.error(‘This is an error message’) logging.critical(‘This is a critical message’)

Error while install airflow: By default one of Airflow’s dependencies installs a GPL

Try the following: export AIRFLOW_GPL_UNIDECODE=yes OR export SLUGIFY_USES_TEXT_UNIDECODE=yes Using export makes the environment variable available to all the subprocesses. Also, make sure you are using pip install apache-airflow[postgres] and not pip install airflow[postgres] Which should you use: if using AIRFLOW_GPL_UNIDECODE, airflow will install a dependency that is under GPL license, which means you won’t be … Read more

execution_date in airflow: need to access as a variable

The BashOperator‘s bash_command argument is a template. You can access execution_date in any template as a datetime object using the execution_date variable. In the template, you can use any jinja2 methods to manipulate it. Using the following as your BashOperator bash_command string: # pass in the first of the current month some_command.sh {{ execution_date.replace(day=1) }} … Read more

Airflow: how to delete a DAG?

Edit 8/27/18 – Airflow 1.10 is now released on PyPI! https://pypi.org/project/apache-airflow/1.10.0/ How to delete a DAG completely We have this feature now in Airflow ≥ 1.10! The PR #2199 (Jira: AIRFLOW-1002) adding DAG removal to Airflow has now been merged which allows fully deleting a DAG’s entries from all of the related tables. The core … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)