cancel
Showing results for 
Search instead for 
Did you mean: 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results for 
Search instead for 
Did you mean: 

Read zstd file from Databricks

bigt23
New Contributor II

I just started to read `zstd` compressed file in Databricks on Azure, Runtime 14.1 on Spark 3.5.0

I've set PySpark commands as follows

path = f"wasbs://{container}@{storageaccount}.blob.core.windows.net/test-zstd"
schema = "some schema"
df = spark.read.option("compression", "zstd").json(path, schema)
df.createOrReplaceTempView("TestTable")

then hit sql

%sql
select * from TestTable limit 100

but failed with the following error.

Error in SQL statement: IllegalArgumentException: Codec [zstd] is not available. Known codecs are bzip2, deflate, uncompressed, lz4, gzip, snappy, none.

 Is there anyway to read `zstd` files there?

1 ACCEPTED SOLUTION

Accepted Solutions

-werners-
Esteemed Contributor III

The available compression types are format dependent.
For json, zstd is not (yet) available, whereas for parquet it is.

View solution in original post

2 REPLIES 2

-werners-
Esteemed Contributor III

The available compression types are format dependent.
For json, zstd is not (yet) available, whereas for parquet it is.

bigt23
New Contributor II

Thanks for clarifying!

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!