简体   繁体   中英

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

Source datatype: varchar

Target datatype: String

How to get rid of NULL values and populate them with Blank values at the Target side?

NOT NULL Constraint is not working

Yes, You can Rid all NULL values and keep them as Blank values . You can follow below codes its working fine for me.

Remove selected NULL columns keep them as Blank values .

select *, ifnull(marks,' ') marks1  from datastore_panels.tb11

参考 1

Remove all NULL values keep them as Blank values .

select Name, subject, ifnull(marks,' ') marks, ifnull(Status,' ') Status, ifnull(Attendance,' ') Attendance   from datastore_panels.tb11

参考资料 2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM