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!

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group