Last active
June 20, 2019 16:35
-
-
Save mrshu/d8783cf8a60c6b11536f487f31141a65 to your computer and use it in GitHub Desktop.
Simple Athena Query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from airflow.models import DAG | |
from airflow.contrib.operators.aws_athena_operator import AWSAthenaOperator | |
from datetime import datetime | |
with DAG(dag_id='simple_athena_query', | |
schedule_interval=None, | |
start_date=datetime(2019, 5, 21)) as dag: | |
run_query = AWSAthenaOperator( | |
task_id='run_query', | |
query='SELECT * FROM UNNEST(SEQUENCE(0, 100))', | |
output_location='s3://my-bucket/my-path/', | |
database='my_database' | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment