[英]Databricks not updating in SQL query
I am trying to replace special characters from a table column using SQL a SQL query.我正在尝试使用 SQL SQL 查询替换表列中的特殊字符。 However, I get the following error.
但是,我收到以下错误。 Can anyone tell me what I did wrong or how I should approach this?
谁能告诉我我做错了什么或者我应该如何处理这个问题?
SQL QUERY查询
UPDATE wine SET description = REPLACE(description, '%', '')
ERROR错误
error in sql statement: analysisexception: update destination only supports delta sources.
Databricks only supports updates for delta (delta lake) tables. Databricks仅支持delta(delta湖)表的更新。 The error message indicates that you try the update on a non-delta-table.
该错误消息表明您在非delta表上尝试更新。 So you would have to convert your data source to delta.
因此,您必须将数据源转换为delta。 For parquet it is very simple:
对于镶木地板来说非常简单:
CONVERT TO DELTA parquet.`path/to/table` [NO STATISTICS]
[PARTITIONED BY (col_name1 col_type1, col_name2 col_type2, ...)]
See the Documentation for more details. 有关详细信息,请参阅文档 。
CONVERT TO DELTA parquet.转换为 DELTA 实木复合地板。
s3://path/to/table
PARTITIONED BY ( column_name
INT); s3://path/to/table
PARTITIONED BY ( column_name
INT);
--try this for partioned table --对分区表试试这个
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.