Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I’m running a Qlik Replicate task with Databricks as the target endpoint, and I’m periodically encountering the following error:
DELTA_CREATE_TABLE_WITH_NON_EMPTY_LOCATION [...]: Cannot create table [...]. The associated location [...] is not empty and also not a Delta table.
This issue is causing significant latency increases and is becoming disruptive to our workflows.
Is there a reliable way to prevent this error from occurring?
Thank you in advance for any guidance!
Hello @_riccardo ,
In addition to @OritA 's comment, one possible cause of the issue is the use of "DROP TABLE" followed by "CREATE TABLE" commands. This pattern can lead to problems, especially with Delta tables. Databricks recommends using "CREATE OR REPLACE" to overwrite a Delta table, instead of dropping and recreating it.
As a workaround, please try the following steps:
Manually remove the target folder (if applicable).
Add the internal parameter in target Endpoint: $info.query_syntax.create_table
CREATE or REPLACE ${TABLE_TYPE} TABLE ${QO}${TABLE_OWNER}${QC}.${QO}${TABLE_NAME}${QC} ( ${COLUMN_LIST} ) USING DELTA TBLPROPERTIES (delta.autoOptimize.optimizeWrite = true)
Hope it helps.
John.
Hi,
I am not sure what is your exact setting. However, as indicated in the Replicate users guide under the following section :
"https://help.qlik.com/en-US/replicate/May2025/Content/Replicate/Main/DatabricksCloudStorage/databric...
'Replication to Delta tables is not supported'
If this is not the scenario in your case, please open a salesforce case and attach to it the task log and the task diagnostic package for further investigation.
Regards,
Orit
Hello @_riccardo ,
In addition to @OritA 's comment, one possible cause of the issue is the use of "DROP TABLE" followed by "CREATE TABLE" commands. This pattern can lead to problems, especially with Delta tables. Databricks recommends using "CREATE OR REPLACE" to overwrite a Delta table, instead of dropping and recreating it.
As a workaround, please try the following steps:
Manually remove the target folder (if applicable).
Add the internal parameter in target Endpoint: $info.query_syntax.create_table
CREATE or REPLACE ${TABLE_TYPE} TABLE ${QO}${TABLE_OWNER}${QC}.${QO}${TABLE_NAME}${QC} ( ${COLUMN_LIST} ) USING DELTA TBLPROPERTIES (delta.autoOptimize.optimizeWrite = true)
Hope it helps.
John.