From 3b120767a15191d2e37402278de50186de4b92b0 Mon Sep 17 00:00:00 2001 From: Vitalii Makarchenkov Date: Thu, 18 Jul 2024 13:07:50 +0300 Subject: [PATCH] Add tableLocation --- .../databricks/sqlgenerator/CreateTableGeneratorDatabricks.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/liquibase/ext/databricks/sqlgenerator/CreateTableGeneratorDatabricks.java b/src/main/java/liquibase/ext/databricks/sqlgenerator/CreateTableGeneratorDatabricks.java index 5413ed9d..05f9531c 100644 --- a/src/main/java/liquibase/ext/databricks/sqlgenerator/CreateTableGeneratorDatabricks.java +++ b/src/main/java/liquibase/ext/databricks/sqlgenerator/CreateTableGeneratorDatabricks.java @@ -57,6 +57,8 @@ public Sql[] generateSql(CreateTableStatement statement, Database database, SqlG // Databricks can decide to have tables live in a particular location. If null, Databricks will handle the location automatically in DBFS if (!StringUtils.isEmpty(thisStatement.getTableLocation())) { finalsql += " LOCATION '" + thisStatement.getTableLocation() + "'"; + } else if (thisStatement.getExtendedTableProperties() != null && StringUtils.isNotEmpty(thisStatement.getExtendedTableProperties().getTableLocation())) { + finalsql += " LOCATION '" + thisStatement.getExtendedTableProperties().getTableLocation() + "'"; } ArrayList clusterCols = thisStatement.getClusterColumns();