cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Databricks SQL Endpoint Failing to create an external table on a parquet file with Decimal or Timestamp datatype

ta_db
New Contributor

I'm using the Databricks SQL Endpoint and I'm attempting to create an external table on top of an existing parquet file. I can do this so long as my table definition does not include a reference to a decimal or timestamp/date datatype.

ex. This works

CREATE EXTERNAL TABLE sampleTable (  
ColA STRING,  
ColB INT)  
LOCATION 'storagelocation' STORED AS PARQUET

When I need to reference a timestamp column "ColC TIMESTAMP", I receive the following error..."Parquet does not support timestamp. See HIVE-6384"

I found in Databricks you can specify the hive version by using the following, but this did not resolve my issue.

spark.sql.hive.metastore.version 1.2.1 
spark.sql.hive.metastore.jars builtin

Any ideas on a way around this?

2 REPLIES 2

Kaniz
Community Manager
Community Manager

Hi @T A​, Which Databricks Runtime version are you using? Add the settings according to your DBR runtime.

Databricks Runtime 6.6 and below

  • spark.sql.hive.metastore.version 1.2.1
  • spark.sql.hive.metastore.jars builtin

Databricks Runtime 7.0 and above

  • spark.sql.hive.metastore.jars /dbfs <path-to-downloaded-jars>
  • spark.sql.hive.metastore.version 1.2.1

Here is the KB on how to use the TIMESTAMP with a Parquet table.

Anonymous
Not applicable

Hey there @T A​ 

Hope everything is going great!

Does @Kaniz Fatma​'s response answer your question? If yes, would you be happy to mark it as best so that other members can find the solution more quickly? If not, would you be happy to give us more information?

We'd love to hear from you.

Thanks!

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.