How to supress the warning message generated for NULL fields

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
muralisankarr
Premium Member
Premium Member
Posts: 83
Joined: Tue Oct 28, 2008 1:55 am
Location: Chennai

How to supress the warning message generated for NULL fields

Post by muralisankarr »

Hi,

A Simple 'Oracle Enterprise-> Transformer -> Sequential File' job has given me the below warning message.


Sequential_File_1: When checking operator: When validating export schema: At field "SALARY": "null_field" length (0) must match field's fixed width (10)

Sequential_File_1: When checking operator: When validating export schema: At field "COMMISSION": "null_field" length (0) must match field's fixed width (4)

The metadata of the job is

EMPLOYEE_ID NUMBER(6) not null,
FIRST_NAME VARCHAR2(20),
LAST_NAME VARCHAR2(25) not null,
EMAIL VARCHAR2(25) not null,
PHONE_NUMBER VARCHAR2(20),
HIRE_DATE DATE not null,
JOB_ID VARCHAR2(10) not null,
SALARY NUMBER(8,2),
COMMISSION NUMBER(2,2),
MANAGER_ID NUMBER(6),
DEPARTMENT_ID NUMBER(4)

Why we got the warning message on Decimal columns alone? Is there any way to habdle this? Please help me

Many Thanks
rMS
The minute you start talking about what you're going to do if you lose, you have lost
arvind_ds
Participant
Posts: 428
Joined: Thu Aug 16, 2007 11:38 pm
Location: Manali

Post by arvind_ds »

Do null handling for said columns in the transformer stage
Arvind
muralisankarr
Premium Member
Premium Member
Posts: 83
Joined: Tue Oct 28, 2008 1:55 am
Location: Chennai

Post by muralisankarr »

arvind_ds wrote:Do null handling for said columns in the transformer stage
Nope. They are simple one to one mapping
The minute you start talking about what you're going to do if you lose, you have lost
arvind_ds
Participant
Posts: 428
Joined: Thu Aug 16, 2007 11:38 pm
Location: Manali

Post by arvind_ds »

It is not possible to write NULL values to a sequential file.
Arvind
arvind_ds
Participant
Posts: 428
Joined: Thu Aug 16, 2007 11:38 pm
Location: Manali

Post by arvind_ds »

It is not possible to write NULL values to a sequential file.
Arvind
ds_search2008
Participant
Posts: 75
Joined: Thu Nov 27, 2008 10:12 am

Post by ds_search2008 »

muralisankarr,

You can fix this by Nullable properties in the sequential file column tab. Meaning, in the column tab click on the number against the corresponding column "Edit Column Meta Data" window will open. Set the "Nullable" properties accordingly.

Regards
muralisankarr
Premium Member
Premium Member
Posts: 83
Joined: Tue Oct 28, 2008 1:55 am
Location: Chennai

Post by muralisankarr »

ds_search2008 wrote:muralisankarr,

You can fix this by Nullable properties in the sequential file column tab. Meaning, in the column tab click on the number against the corresponding column "Edit Column Meta Data" window will open. Set the "Nullable" properties accordingly.

Regards
Hi,

For the following action 'Edit column meta data > NULLABLE>Null Field Value = <<<Character equivalent to length>>>' the warning messages are suppressed. But on null fields, the values of nulls are replaced by the characters we entered in Edit column meta data. Is there any way we have to suppress the warning message with out replacing the null value with a character? Please help me sort this out
The minute you start talking about what you're going to do if you lose, you have lost
ds_search2008
Participant
Posts: 75
Joined: Thu Nov 27, 2008 10:12 am

Post by ds_search2008 »

In the transformer stage use SetNull() against the corresponding null fields and in sequential stage Null Field Value should be set to '', meaning Null Field Value =''.

Regards
muralisankarr
Premium Member
Premium Member
Posts: 83
Joined: Tue Oct 28, 2008 1:55 am
Location: Chennai

Post by muralisankarr »

ds_search2008 wrote:In the transformer stage use SetNull() against the corresponding null fields and in sequential stage Null Field Value should be set to '', meaning Null Field Value =''.

Regards
Nope. It doesn't work out. I still got the error message :(
The minute you start talking about what you're going to do if you lose, you have lost
throbinson
Charter Member
Charter Member
Posts: 299
Joined: Wed Nov 13, 2002 5:38 pm
Location: USA

Post by throbinson »

I hate to jump into the mis-information and bad advice pool but what the heck.
NULLS have no meaning to a Sequential file.
NULLS have to be represented by, some out-of-bound value (hopefully) of the proper width, when encountered in a fixed width field like a date field when being written out to a Sequential File.
I like to define this;
APT_IMPEXP_ALLOW_ZERO_LENGTH_FIXED_NULL
as a Project level Environment variable and set it's value to TRUE.
It will allow one to import/export a zero length fixed width NULL within a Sequential file with no warnings. For example a '' (empty string, that is tick tick) which I also define as the Sequential File => Input tab => Format => Field Default => Null Field value property.
sharantheboss
Participant
Posts: 14
Joined: Mon Mar 23, 2009 12:57 am
Location: INDIA

Re: How to supress the warning message generated for NULL fi

Post by sharantheboss »

Hi,

In sequential file datatypes Char and Decimal are considered as fixed widht,so you have to edit metadata properites for sequential file,wherein need to give Null field value=' ' no. of spaces shoud be equal to lenght of column

Regards
Boss :P






muralisankarr wrote:Hi,

A Simple 'Oracle Enterprise-> Transformer -> Sequential File' job has given me the below warning message.


Sequential_File_1: When checking operator: When validating export schema: At field "SALARY": "null_field" length (0) must match field's fixed width (10)

Sequential_File_1: When checking operator: When validating export schema: At field "COMMISSION": "null_field" length (0) must match field's fixed width (4)

The metadata of the job is

EMPLOYEE_ID NUMBER(6) not null,
FIRST_NAME VARCHAR2(20),
LAST_NAME VARCHAR2(25) not null,
EMAIL VARCHAR2(25) not null,
PHONE_NUMBER VARCHAR2(20),
HIRE_DATE DATE not null,
JOB_ID VARCHAR2(10) not null,
SALARY NUMBER(8,2),
COMMISSION NUMBER(2,2),
MANAGER_ID NUMBER(6),
DEPARTMENT_ID NUMBER(4)

Why we got the warning message on Decimal columns alone? Is there any way to habdle this? Please help me

Many Thanks
rMS
DS Info
dsuser_cai
Premium Member
Premium Member
Posts: 151
Joined: Fri Feb 13, 2009 4:19 pm

Re: How to supress the warning message generated for NULL fi

Post by dsuser_cai »

Use the env variable: (you need to define it in the DS Admin, in user defined section)

APT_IMPEXP_ALLOW_ZERO_LENGTH_FIXED_NULL

value is TRUE.
Thanks
Karthick
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Set the Null Field Value property to something that has the same number of characters as does the fixed-width field.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply