while copying data from Sql server to Databricks delta lake(sql notebook activity) Blank values populating as Null values

Viewed 258

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

1 Answers

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

Ref1

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

Ref2

Related