Skip to content
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

How to run rest catalog service which can point to aliyun oss instead of aws s3? #104

Open
ChenShuai1981 opened this issue Jul 11, 2024 · 1 comment

Comments

@ChenShuai1981
Copy link

I tried to run spark sql to write iceberg table onto aliyun oss with rest catalog which coming from iceberg spark quickstart docker image but it complained the following error. So, How to run rest catalog service which can point to aliyun oss instead of aws s3?

$ spark-sql --packages org.apache.iceberg:iceberg-spark-runtime-3.5_2.12:1.5.2 \
>   --conf spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions \
>   --conf spark.sql.catalog.rest=org.apache.iceberg.spark.SparkCatalog \
>   --conf spark.sql.catalog.rest.type=rest \
>   --conf spark.sql.catalog.rest.uri=http://10.68.0.17:8181 \
>   --conf spark.sql.catalog.rest.io-impl=org.apache.iceberg.aliyun.oss.OSSFileIO \
>   --conf spark.sql.catalog.rest.oss.endpoint=oss-cn-shanghai-internal.aliyuncs.com \
>   --conf spark.sql.catalog.rest.client.access-key-id=AK \
>   --conf spark.sql.catalog.rest.client.access-key-secret=SK \
>   --conf spark.sql.catalog.rest.warehouse=oss://odps-prd/lakehouse/iceberg-rest/warehouse \
>   --conf spark.sql.defaultCatalog=rest

spark-sql ()> INSERT INTO rest.mydb.mytable VALUES (1, 'a'), (2, 'b'), (3, 'c');
24/07/11 16:30:01 ERROR Executor: Exception in task 2.0 in stage 0.0 (TID 2)
org.apache.iceberg.exceptions.ValidationException: Invalid scheme: s3 in OSS location s3://warehouse/mydb/mytable/data/00002-2-8c73e677-8916-4a9c-a218-eedbd11d114f-0-00001.parquet
@raphaelauv
Copy link

A full example with minio

#99

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants