Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UNSUPPORTED_DATATYPE] Unsupported data type "DATETIME".(line 1, pos 133) #86

Open
Jace2019 opened this issue Dec 4, 2023 · 6 comments

Comments

@Jace2019
Copy link

Jace2019 commented Dec 4, 2023

This tool was very useful for me when I was working on a deployment of Databricks, thank you for this.

VERSION:
liquibase=4.25.0
DatabricksJDBC42-2.6.34.1058.zip
liquibase-databricks-1.1.1.jar

ACTION:

  1. liquibase init project --project-defaults-file=liquibase.properties --changeLogFile=databricks.sql --format=sql
    2.liquibase update --defaults-file=liquibase.properties --changeLogFile=databricks.sql
    p.s. databricks.sql is empty file

ACTION RESULT:
#1. pass
#2. throw error as below. Occurs when LIQUIBASE TRACKING TABLES are created.

ERROR:
Unexpected error running Liquibase: [Databricks]JDBCDriver ERROR processing query/statement. Error Code: 0, SQL state: 0A000, Query: CREATE TABxxx, Error message from Server: org.apache.hive.service.cli.HiveSQLException: Error running query: [UNSUPPORTED_DATATYPE] org.apache.spark.sql.catalyst.parser.ParseException:
[UNSUPPORTED_DATATYPE] Unsupported data type "DATETIME".(line 1, pos 133)

SQL statement:
CREATE TABLE DATABASECHANGELOG (ID VARCHAR(255) NOT NULL, AUTHOR VARCHAR(255) NOT NULL, FILENAME VARCHAR(255) NOT NULL, DATEEXECUTED datetime NOT NULL, ORDEREXECUTED INT NOT NULL, EXECTYPE VARCHAR(10) NOT NULL, MD5SUM VARCHAR(35), DESCRIPTION VARCHAR(255), COMMENTS VARCHAR(255), TAG VARCHAR(255), LIQUIBASE VARCHAR(20), CONTEXTS VARCHAR(255), LABELS VARCHAR(255), DEPLOYMENT_ID VARCHAR(10))

Would you help show any advice ? thanks a lot.

@Jace2019
Copy link
Author

Jace2019 commented Dec 5, 2023

I tried with --currentDateTimeFunction as well. Its not working.
Can someone guide me how to fix this?thanks a lot

@Jace2019
Copy link
Author

Jace2019 commented Dec 8, 2023

I OK now.
--include below
1.FROM liquibase/liquibase (=4.25.0)
2.DatabricksJDBC42-2.6.34.1058.zip
3.liquibase-databricks-1.1.2.jar

@BillCM
Copy link

BillCM commented Jan 5, 2024

@Jace2019 I'm hitting this same problem. Is your last message saying that this is working or you now?

`ERROR: Exception Primary Reason: [Databricks]DatabricksJDBCDriver ERROR processing query/statement. Error Code: 0, SQL state: org.apache.hive.service.cli.HiveSQLException: Error running query: [UNSUPPORTED_DATATYPE] org.apache.spark.sql.catalyst.parser.ParseException:
[UNSUPPORTED_DATATYPE] Unsupported data type "DATETIME".(line 1, pos 133)

== SQL ==
CREATE TABLE DATABASECHANGELOG (ID VARCHAR(255) NOT NULL, AUTHOR VARCHAR(255) NOT NULL, FILENAME VARCHAR(255) NOT NULL, DATEEXECUTED datetime NOT NULL, ORDEREXECUTED INT NOT NULL, EXECTYPE VARCHAR(10) NOT NULL, MD5SUM VARCHAR(35), DESCRIPTION VARCHAR(255), COMMENTS VARCHAR(255), TAG VARCHAR(255), LIQUIBASE VARCHAR(20), CONTEXTS VARCHAR(255), LABELS VARCHAR(255), DEPLOYMENT_ID VARCHAR(10))`

  • liquibase installed on OSX via Homebrew: Version: 4.25.1
  • DatabricksJDBC42-2.6.36.1062
  • liquibase-databricks-1.1.2.jar

@BillCM
Copy link

BillCM commented Jan 5, 2024

I also made it past this. Liquibase wasn't picking up the jar.

@Jace2019
Copy link
Author

Jace2019 commented Jan 9, 2024

FROM liquibase/liquibase:4.25.0

RUN wget https://databricks-bi-artifacts.s3.us-east-2.amazonaws.com/simbaspark-drivers/jdbc/2.6.34/DatabricksJDBC42-2.6.34.1058.zip;\
unzip DatabricksJDBC42-2.6.34.1058.zip;
mv DatabricksJDBC42-2.6.34.1058\ 2/DatabricksJDBC42.jar /liquibase/lib/;
rm DatabricksJDBC42-2.6.34.1058.zip;
wget https://github.com/liquibase/liquibase-databricks/releases/download/v1.1.2/liquibase-databricks-1.1.2.jar;\
mv liquibase-databricks-1.1.2.jar /liquibase/lib/

using the dockerfile(part) can working.

@Sophiakorginska
Copy link

Hi @Jace2019 and @BillCM ,
I am facing a similar issue but related to the configuration URL.

ERROR: Exception Primary Reason: [Databricks][JDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: null, Query: CREATE TABLE `my_catalog`.liquibase_demo_dev.DATABASECHANGELOG (ID VARCHAR(255) NOT NULL, AUTHOR VARCHAR(255) NOT NULL, FILENAME VARCHAR(255) NOT NULL, DATEEXECUTED TIMESTAMP NOT NULL, ORDEREXECUTED INT NOT NULL, EXECTYPE VARCHAR(10) NOT NULL, MD5SUM VARCHAR(35), DESCRIPTION VARCHAR(255), COMMENTS VARCHAR(255), TAG VARCHAR(255), LIQUIBASE VARCHAR(20), CONTEXTS VARCHAR(255), LABELS VARCHAR(255), DEPLOYMENT_ID VARCHAR(10)), Error message from Server: Configuration URL is not available..
ERROR: Exception Primary Source: SparkSQL 3.1.1
  • Liquibase Docker image: Version: 4.25.1
  • DatabricksJDBC42-2.6.36.1062
  • liquibase-databricks-1.1.2.jar
    Could you please share your liquibase.properties file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants