Lookup warning on null
Posted: Thu Dec 31, 2009 8:17 pm
Source Employees:
record
(
EMPLOYEE_ID:int32;
FIRST_NAME:nullable string[max=20] {prefix=2};
LAST_NAME:string[max=25] {prefix=2};
EMAIL:string[max=25] {prefix=2};
PHONE_NUMBER:nullable string[max=20] {prefix=2};
HIRE_DATE:timestamp;
JOB_ID:string[max=10] {prefix=2};
SALARY:nullable decimal[8,2];
COMMISSION:nullable decimal[2,2];
MANAGER_ID:nullable int32;
DEPARTMENT_ID:nullable int32;
)
Lookup Departments:
record
(
DEPARTMENT_ID:int32;
DEPARTMENT_NAME:string[max=30] {prefix=2};
MANAGER_ID:nullable int32;
LOCATION_ID:nullable int32;
)
We are performing a Lookup with th a above two tables for the below target (of dataset)
Target:
record
(
EMPLOYEE_ID:int32;
FIRST_NAME:nullable string[max=20] {prefix=2};
LAST_NAME:string[max=25] {prefix=2};
EMAIL:string[max=25] {prefix=2};
PHONE_NUMBER:nullable string[max=20] {prefix=2};
HIRE_DATE:timestamp;
JOB_ID:string[max=10] {prefix=2};
SALARY:nullable decimal[8,2];
COMMISSION:nullable decimal[2,2];
MANAGER_ID:nullable int32;
DEPARTMENT_NAME:string[max=30] {prefix=2};
LOCATION_ID:nullable int32;
)
The department_id in source and the target are defined as Nullable. But inspite of this setting I am getting the below error messages
LookupEmpDep,0: When binding input interface field "DEPARTMENT_ID" to field "DEPARTMENT_ID": Converting nullable source to non-nullable result; fatal runtime error could occur (use a modify operator to specify value to which null should be converted)
LookupEmpDep,0: Null in field "DEPARTMENT_ID ": Result is non-nullable and there is no handle_null to specify a default value
LookupEmpDep,0: Failed a keylookup for record.
And the job is aborted. I have used the modify operator to handle this. But I need to understand why we got these two messages? I have mapped the columns to and from not null. Please explain
ManyThanks
MSR
record
(
EMPLOYEE_ID:int32;
FIRST_NAME:nullable string[max=20] {prefix=2};
LAST_NAME:string[max=25] {prefix=2};
EMAIL:string[max=25] {prefix=2};
PHONE_NUMBER:nullable string[max=20] {prefix=2};
HIRE_DATE:timestamp;
JOB_ID:string[max=10] {prefix=2};
SALARY:nullable decimal[8,2];
COMMISSION:nullable decimal[2,2];
MANAGER_ID:nullable int32;
DEPARTMENT_ID:nullable int32;
)
Lookup Departments:
record
(
DEPARTMENT_ID:int32;
DEPARTMENT_NAME:string[max=30] {prefix=2};
MANAGER_ID:nullable int32;
LOCATION_ID:nullable int32;
)
We are performing a Lookup with th a above two tables for the below target (of dataset)
Target:
record
(
EMPLOYEE_ID:int32;
FIRST_NAME:nullable string[max=20] {prefix=2};
LAST_NAME:string[max=25] {prefix=2};
EMAIL:string[max=25] {prefix=2};
PHONE_NUMBER:nullable string[max=20] {prefix=2};
HIRE_DATE:timestamp;
JOB_ID:string[max=10] {prefix=2};
SALARY:nullable decimal[8,2];
COMMISSION:nullable decimal[2,2];
MANAGER_ID:nullable int32;
DEPARTMENT_NAME:string[max=30] {prefix=2};
LOCATION_ID:nullable int32;
)
The department_id in source and the target are defined as Nullable. But inspite of this setting I am getting the below error messages
LookupEmpDep,0: When binding input interface field "DEPARTMENT_ID" to field "DEPARTMENT_ID": Converting nullable source to non-nullable result; fatal runtime error could occur (use a modify operator to specify value to which null should be converted)
LookupEmpDep,0: Null in field "DEPARTMENT_ID ": Result is non-nullable and there is no handle_null to specify a default value
LookupEmpDep,0: Failed a keylookup for record.
And the job is aborted. I have used the modify operator to handle this. But I need to understand why we got these two messages? I have mapped the columns to and from not null. Please explain
ManyThanks
MSR