Git Product home page Git Product logo

local-glue-dev's Introduction

Local Glue environment

docker-compose build
docker-compose up -d
docker-compose exec glue bash

Example

spark-submit

$ bash script/preprocess.sh
$ spark-submit example/s3_parquet.py --JOB_NAME=dummy --STAGE=production
$ aws s3 ls s3://test-bucket/spark/ --endpoint-url http://localstack:4566
2021-01-21 14:27:56          0 _SUCCESS
2021-01-21 14:27:55        975 part-00000-9a345736-c9ae-407a-af3c-84ac817d78c9-c000.snappy.parquet
2021-01-21 14:27:56        970 part-00001-9a345736-c9ae-407a-af3c-84ac817d78c9-c000.snappy.parquet

$ aws s3 cp \
    s3://test-bucket/spark/part-00000-9a345736-c9ae-407a-af3c-84ac817d78c9-c000.snappy.parquet \
    foo.snappy.parquet \
    --endpoint-url http://localstack:4566
$ parquet-tools cat foo.snappy.parquet
variable_1 = 1
variable_2 = 1.87
variable_3 = new_york

variable_1 = 4
variable_2 = 2.76
variable_3 = la

variable_1 = 6
variable_2 = 3.3
variable_3 = boston

jupyter notebook

$ docker-compose exec glue /home/jupyter/jupyter_start.sh

Access http://localhost:8888 to use jupyter notebook.

Access MySQL, Postgres and localstack

From container:

$ mysql -h db -uroot -ptest -P3306
$ psql -h db2 -Upostgres -p5432
$ aws s3 ls --endpoint-url http://localstack:4566

From host OS:

$ mysql -h 127.0.0.1 -uroot -ptest -P3306
$ psql -h 127.0.0.1 -Upostgres -p5432
$ aws s3 ls --endpoint-url http://localhost:4566

local-glue-dev's People

Contributors

goropikari avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.