Skip to content

Commit

Permalink
sample has been fully init
Browse files Browse the repository at this point in the history
  • Loading branch information
frankcash committed Mar 27, 2019
1 parent 312eccb commit 5784284
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,5 @@ temp/output.csv
temp/*.csv

*.pid
.data/
.data/
config/.env.production
1 change: 0 additions & 1 deletion airflow_home/plugins/postgres_to_s3_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def query_db(self, query, hook):
return self.gen_file(content)

def gen_file(self, content):
print(f"gen_file {content}")
output = io.BytesIO()
writer = csv.writer(output, delimiter='|', encoding='utf-8')
writer.writerows(content)
Expand Down
3 changes: 3 additions & 0 deletions config/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow123@postgres:5432/airflow
AIRFLOW_CONN_HACKERQUEUE_PROD=postgres://user:password@db_host:5432/db
AIRFLOW_CONN_DEMO_BUCKET=s3://aws_access_key_id:aws_secret_access_key@S3
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ services:
build: .
image: airflow_compose:latest
restart: on-failure
environment:
AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow123@postgres:5432/airflow
env_file:
- config/.env.production
ports:
- "8080:8080"
- "5555:5555"
Expand Down

0 comments on commit 5784284

Please sign in to comment.