[英]while copying data from Sql server to Databricks delta lake(sql notebook activity) Blank values populating as Null values
I am copying data from SQL server through ADF copy activity and storing it in Databricks delta lake with SQL notebook, After storing the data the Blank values storing as NULL我正在通过 ADF 复制活动从 SQL 服务器复制数据,并使用 SQL 笔记本将其存储在 Databricks delta lake 中,存储数据后,空白值存储为 NULL
Source datatype: varchar源数据类型:varchar
Target datatype: String目标数据类型:字符串
How to get rid of NULL values and populate them with Blank values at the Target side?如何摆脱 NULL 值并在目标端用空白值填充它们?
NOT NULL Constraint is not working NOT NULL 约束不起作用
Yes, You can Rid all NULL values and keep them as Blank values .是的,您可以Rid all NULL values 并将它们保留为Blank values 。 You can follow below codes its working fine for me.您可以遵循以下代码,它对我来说工作正常。
Remove selected NULL columns keep them as Blank values .删除选定的 NULL 列,将它们保留为空白值。
select *, ifnull(marks,' ') marks1 from datastore_panels.tb11
Remove all NULL values keep them as Blank values .删除所有 NULL 值,将它们保留为空白值。
select Name, subject, ifnull(marks,' ') marks, ifnull(Status,' ') Status, ifnull(Attendance,' ') Attendance from datastore_panels.tb11
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.