cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Databricks 2.6.25 JDBC driver can't create tables with `GENERATED` columns

findinpath
Contributor

I'm using the Databricks JDBC driver recently made available via Maven:

https://mvnrepository.com/artifact/com.databricks/databricks-jdbc/2.6.25

While trying to create a table with `GENERATED` columns I receive the following exception:

Caused by: java.sql.SQLException: [Databricks][DatabricksJDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: Error running query: org.apache.spark.sql.catalyst.parser.ParseException: 
no viable alternative at input 'CREATE TABLE default.test_generated_columns_not_supported_sbju2lhx0065(  id INT,  a_number INT,  a_number_times_two INT GENERATED'(line 1, pos 120)
 
== SQL ==
CREATE TABLE default.test_generated_columns_not_supported_sbju2lhx0065(  id INT,  a_number INT,  a_number_times_two INT GENERATED ALWAYS AS (a_number * 2)) USING DELTA
------------------------------------------------------------------------------------------------------------------------^^^
, Query: CREATE TABLE default.test_generated_columns_not_supported_sbju2lhx0065(  id INT,  a_number INT,  a_number_times_two INT GENERATED ALWAYS AS (a_number * 2)) USING DELTA.
	at com.databricks.client.hivecommon.api.HS2Client.buildExceptionFromTStatusSqlState(Unknown Source)
	at com.databricks.client.hivecommon.api.HS2Client.pollForOperationCompletion(Unknown Source)
	at com.databricks.client.hivecommon.api.HS2Client.executeStatementInternal(Unknown Source)
	at com.databricks.client.hivecommon.api.HS2Client.executeStatement(Unknown Source)
	at com.databricks.client.hivecommon.dataengine.HiveJDBCNativeQueryExecutor.executeRowCountQueryHelper(Unknown Source)
	at com.databricks.client.hivecommon.dataengine.HiveJDBCNativeQueryExecutor.execute(Unknown Source)
	at com.databricks.client.jdbc.common.SStatement.executeNoParams(Unknown Source)
	at com.databricks.client.jdbc.common.BaseStatement.execute(Unknown Source)
	at com.databricks.client.hivecommon.jdbc42.Hive42Statement.execute(Unknown Source)

This query was working fine when I was using simba spark-jdbc42 2.6.16.

I've tried running the query also in a Databricks Community Cloud Notebook and there it was executed just fine.

Is this a regression issue?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Hubert Dudek​ , You can report it as a BUG. Please reach out to me in case you face any other issues.

View solution in original post

4 REPLIES 4

Hubert-Dudek
Esteemed Contributor III

@Kaniz Fatma​ @Vartika Nain​ can we report it as a BUG?

Hi @Hubert Dudek​ , You can report it as a BUG. Please reach out to me in case you face any other issues.

findinpath
Contributor

I was under the impression that this has been recognised as a BUG and is being handled by Databricks.

What do I need to do for reporting the issue officially as a BUG?

@Marius Grama​, Databricks offers several plans that provide dedicated support and timely service for the Databricks platform and Apache Spark™.

If your organization does not have a Databricks support subscription, or if you are not an authorized contact for your company’s support subscription, you can find answers to many questions on the Databricks Help Center.

If you are already an authorized Databricks support contact for your organization, this article shows you how to manage the support process.

You can file a support ticket and report a bug from here.

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!