Skip to content

ramirezcjuank/docker_sql

Repository files navigation

docker run -it
-e POSTGRES_USER="root"
-e POSTGRES_PASSWORD="root"
-e POSTGRES_DB="ny_taxi"
-v C:/Users/ramir/Documents/Docker/2_DOCKER_SQL/ny_taxi_postgres_data:/var/lib/postgresql/data
-p 5433:5432
--network=pg-network
--name pg-database
postgres:13

docker run -it
-e PGADMIN_DEFAULT_EMAIL="admin@admin.com"
-e PGADMIN_DEFAULT_PASSWORD="root"
-p 8080:80
--network=pg-network
--name pgadmin-2
dpage/pgadmin4

URL="https://github.com/DataTalksClub/nyc-tlc-data/releases/download/yellow/yellow_tripdata_2021-01.csv.gz"

python ingest_data.py
--user=root
--password=root
--host=localhost
--port=5432
--db=ny_taxi
--table_name=yellow_taxi_trips
--url=${URL}

docker build -t taxi_ingest:v001 .

URL="https://github.com/DataTalksClub/nyc-tlc-data/releases/download/yellow/yellow_tripdata_2021-01.csv.gz"

docker run -it
--network=pg-network
taxi_ingest:v001
--user=root
--password=root
--host=pg-database
--port=5432
--db=ny_taxi
--table_name=yellow_taxi_trips
--url=${URL}

About

DE zoomcamp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published