NhatDuy11 commented on issue #4914:
URL: https://github.com/apache/iceberg/issues/4914#issuecomment-1728741727
hello @CFan7, can you give me an example of compress parquet to gzip , my
wish is when i query it to output gzip file , i am working with iceberg table
and i am using pyspark language,recommend using property
write.parquet.compression-codec
Mycode:
from pyspark.sql import SparkSession
spark = SparkSession.builder \
.appName("CSVICEBERG") \
.config("spark.jars.packages",
"org.apache.iceberg:iceberg-spark-runtime-3.4_2.12:1.3.0") \
.config("spark.sql.extensions",
"org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions") \
.config("spark.sql.catalog.spark_catalog",
"org.apache.iceberg.spark.SparkSessionCatalog") \
.config("spark.sql.catalog.spark_catalog.type", "hive") \
.config("spark.sql.catalog.local",
"org.apache.iceberg.spark.SparkCatalog") \
.config("spark.sql.catalog.local.type", "hadoop") \
.config("spark.sql.catalog.local.warehouse", "D:\iceberg_warehouse") \
.config("spark.sql.defaultCatalog", "local") \
.config("spark.sql.parquet.compression.codec", "gzip") \
.config("write.parquet.compression-codec", "gzip") \
.getOrCreate()
spark.conf.set("write.parquet.compression-codec", "gzip")
spark.sql("CREATE TABLE local.test.cnd10 (name STRING,id INT) using iceberg")
spark.sql("INSERT INTO local.test.cnd10 values ('ABC',1) ")
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]