Run an attached DAG, for example as:
airflow test airflow-hive-sample-utf utf-snowman 2017-01-01
Imporant part:
unicode_snowman = unichr(0x2603)
op_test_select = HiveOperator(
task_id='utf-snowman',
hql='select \'' + unicode_snowman + '\' as utf_text;',
dag=dag)
It should return a single row with an unicode snowman, but instead ends with error:
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2603' in position 8: ordinal not in range(128)
The same applies for unicode characters in external .hql files.
Why is it a problem? Not because of snowmen, but I need to replace some unicode chars in a Hive ETL query.