Skip to content

Instantly share code, notes, and snippets.

@robert8138
Created January 21, 2018 02:01
Show Gist options
  • Save robert8138/f2ed9a794c8ffde72d1eade29b669636 to your computer and use it in GitHub Desktop.
Save robert8138/f2ed9a794c8ffde72d1eade29b669636 to your computer and use it in GitHub Desktop.
A toy example of hive operator
template = """
SELECT
SUM(m_bitcoin_trade_revenue) AS m_revenue
FROM
robert.fct_bitcoin_revenue
WHERE
ds = '{{ ds }}'
"""
HiveOperator(
task_id='fct_bitcoin_revenue',
hql=template,
dag=dag)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment