diff --git a/src/main/java/liquibase/ext/databricks/sqlgenerator/CreateTableGeneratorDatabricks.java b/src/main/java/liquibase/ext/databricks/sqlgenerator/CreateTableGeneratorDatabricks.java index 739470b6..ec7afd17 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();