-
Notifications
You must be signed in to change notification settings - Fork 103
Docs/iceberg example #1077
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+415
−1
Merged
Docs/iceberg example #1077
Changes from 2 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
|
|
||
| this demo shows how to read/write iceberg table using proton. | ||
|
|
||
| quick start: | ||
| 1. run `docker compose up` to start the whole stack | ||
| 2. open `localhost:8888` from the broswer and run all the python code that create iceberg table and write read data from `IcebergPythonTest` notebook | ||
| 3. run `proton-client --user proton --password proton@t+` to start a proton client cli in the proton container | ||
| 4. run all the script in `script/proton.sql` to query the iceberg table and write some data into iceberg table | ||
| 5. in the notebook, rerun the cell that read the iceberg table and check the newly inserted data from proton. |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| url_scheme_mappers: | ||
| s3: | ||
| to: http://minio:9000/{bucket} |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| version: '3.8' | ||
|
|
||
| services: | ||
| # Iceberg REST Catalog | ||
| iceberg-rest: | ||
| image: tabulario/iceberg-rest:latest | ||
| container_name: iceberg-rest | ||
| ports: | ||
| - "8181:8181" | ||
| environment: | ||
| - CATALOG_WAREHOUSE=s3://warehouse/ | ||
| - CATALOG_IO__IMPL=org.apache.iceberg.aws.s3.S3FileIO | ||
| - CATALOG_S3_ENDPOINT=http://minio:9000 | ||
| - CATALOG_S3_ACCESS__KEY__ID=admin | ||
| - CATALOG_S3_SECRET__ACCESS__KEY=Password! | ||
| - CATALOG_S3_PATH__STYLE__ACCESS=true | ||
| - AWS_REGION=us-east-1 | ||
| - CATALOG_S3_REGION=us-east-1 | ||
| - CATALOG_URI__MAPPING=s3://warehouse/:http://minio:9000/warehouse/ | ||
| depends_on: | ||
| - minio | ||
|
|
||
| # MinIO for storage | ||
| minio: | ||
| image: minio/minio:latest | ||
| container_name: minio | ||
| ports: | ||
| - "9000:9000" | ||
| - "9001:9001" | ||
| environment: | ||
| MINIO_ROOT_USER: admin | ||
| MINIO_ROOT_PASSWORD: Password! | ||
| command: server /data --console-address ":9001" | ||
| volumes: | ||
| - minio-data:/data | ||
|
|
||
| minio-setup: | ||
| image: minio/mc:latest | ||
| depends_on: | ||
| - minio | ||
| entrypoint: > | ||
| /bin/sh -c " | ||
| sleep 5; | ||
| /usr/bin/mc alias set myminio http://minio:9000 admin Password!; | ||
| /usr/bin/mc mb myminio/warehouse; | ||
| exit 0; | ||
| " | ||
|
|
||
| proton: | ||
| image: d.timeplus.com/timeplus-io/proton:latest | ||
| platform: linux/amd64 | ||
| ports: | ||
| - 8002:8000 | ||
| - 8463:8463 | ||
| - 8123:8123 | ||
| - 3218:3218 | ||
| environment: | ||
| - ENABLE_DATA_PREALLOCATE=false | ||
| volumes: | ||
| - proton_data:/var/lib/proton/ | ||
| - ./conf/proton-server.yaml:/etc/proton-server/config.d/proton-server.yaml:ro | ||
|
|
||
| # Jupyter Notebook | ||
| jupyter: | ||
| image: jupyter/pyspark-notebook:latest | ||
| container_name: jupyter-iceberg | ||
| ports: | ||
| - "8888:8888" | ||
| environment: | ||
| - JUPYTER_ENABLE_LAB=yes | ||
| - GRANT_SUDO=yes | ||
| volumes: | ||
| - ./notebooks:/home/jovyan/work | ||
| command: start-notebook.sh --NotebookApp.token='' --NotebookApp.password='' | ||
| depends_on: | ||
| - iceberg-rest | ||
| - minio | ||
| user: root | ||
| working_dir: /home/jovyan/work | ||
|
|
||
| volumes: | ||
| minio-data: | ||
| proton_data: | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.