
# DLI Delta常见问题
#### 执行insert into/overwrite table_name partition(part_key='part_value') select ...报错DLI.0005: DeltaAnalysisException: Partition column \`dt\` not found in schema \[id, name\]
根因分析：不支持insert into/overwrite table_name partition(part_key='part_value')语法。
#### 执行sql报错DLI.0005: There should be at least one partition pruning predicate on partitioned table \`777dd\`.\`test_delta_parts1\`
解决方案：在console页面设置中添加参数spark.sql.forcePartitionPredicatesOnPartitionedTable.enabled值为false。
#### show create table查看建表语句报错DLI.0005: Operation not allowed: \`SHOW CREATE TABLE\` is not supported for Delta tables
根因分析：不支持该语法，可通过Describe formatted查看表结构。
#### 执行vacuum报错DLI.0001: IllegalArgumentException: requirement failed: Are you sure you would like to vacuum files with such a low retention period?
根因分析：RETAIN 保留期过短（少于168小时），需要确认是否能清理该时间前的数据，将无法再回头查看在指定数据保留期之前创建的版本。确认清理可在console页面设置中添加参数spark.databricks.delta.retentionDurationCheck.enabled值为false。
#### 执行rename/drop column报错DLI.0005: DeltaAnalysisException: Column rename is not supported for your Delta table...
解决方案：先执行如下语句，再执行rename。
ALTER TABLE delta_perms1 SET TBLPROPERTIES (
'delta.columnMapping.mode' = 'name',
'delta.minReaderVersion' = '2',
'delta.minWriterVersion' = '5');
