SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

BL_PRESERVE_BLANKS=YES not working in the bulk load in SAS Data Intergration

Accepted Solution Solved
Reply
Regular Contributor
Posts: 152
Accepted Solution

BL_PRESERVE_BLANKS=YES not working in the bulk load in SAS Data Intergration

[ Edited ]

Hello experts,

 

I can not find a place for SAS Data Intergration so I will leave my question here.

 

I have a target oracle table that contain null value for some columns. I want to replace the null value with a space ' ' in oracle so I thought BL_PRESERVE_BLANKS=YES option in the bulk load will insert a blank for the null value. But it doesn't and I want to know how to make it working.

 

so DI flow chart like: source SAS table (with blank for some columns)------>bulk load (BL_PRESERVE_BLANKS=YES)----->Target oracle table (still null value)

 

I found update transform in DI is working too but want to explore if BL_PRESERVE_BLANKS=YES option in bulk load gives you same result.

 

 

Thanks


Accepted Solutions
Solution
‎06-07-2017 02:30 AM
Respected Advisor
Posts: 3,887

Re: BL_PRESERVE_BLANKS=YES not working in the bulk load in SAS Data Intergration

@gyambqt

What's the Oracle data type of this column1?

View solution in original post


All Replies
Super User
Posts: 5,254

Re: BL_PRESERVE_BLANKS=YES not working in the bulk load in SAS Data Intergration

This is definitelythe right place!
Please share the code/log from your trial, along with the table definition (in Oracle) for the target table.
Data never sleeps
Respected Advisor
Posts: 3,887

Re: BL_PRESERVE_BLANKS=YES not working in the bulk load in SAS Data Intergration

@gyambqt

Bulk loading is for loading a source SAS table into a database table. 

From what you write your source table is already in Oracle and you just want to replace NULL values for CHAR and VARCHAR2 with a single blank. That would be a SQL UPDATE.

If you're using pass-through SQL then you could use Oracle function NVL() or NVL2() for this task.

Regular Contributor
Posts: 152

Re: BL_PRESERVE_BLANKS=YES not working in the bulk load in SAS Data Intergration

Hi Patrick,

It was my mistake, the source table was stored as SAS table and loaded to oracle through bulk load with bl_preserve_blank=yes. but I can still see null value when I do select column1 from oracletable where column1 is null

Solution
‎06-07-2017 02:30 AM
Respected Advisor
Posts: 3,887

Re: BL_PRESERVE_BLANKS=YES not working in the bulk load in SAS Data Intergration

@gyambqt

What's the Oracle data type of this column1?

Regular Contributor
Posts: 152

Re: BL_PRESERVE_BLANKS=YES not working in the bulk load in SAS Data Intergration

problem solved. Thanks

Respected Advisor
Posts: 3,887

Re: BL_PRESERVE_BLANKS=YES not working in the bulk load in SAS Data Intergration

@gyambqt

How? Can you share what in the end the issue was and how you've resolved it?

Regular Contributor
Posts: 152

Re: BL_PRESERVE_BLANKS=YES not working in the bulk load in SAS Data Intergration

Sure, I set the column to DBnull cannot be null and then BL_PRESERVE_BLANKS=YES works

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 7 replies
  • 157 views
  • 0 likes
  • 3 in conversation