Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
lguevara
Partner - Contributor III
Partner - Contributor III

DataMart type 1 hdr key_id add rows id 0 and -1

 

Hi, please

When I created a data mart with Qlik Cloud Data Integration,

The task add 2 rows for id 0 and -1.

Why this happens?

Can this be prevented from happening?

lguevara_0-1721232492505.png

 

 

Labels (2)
1 Solution

Accepted Solutions
TimGarrod
Employee
Employee

Hello,. this cannot be prevented from happening - these are 'reserved' dimension rows to support late-arriving and 'Unknown' dimension processing.

For example  lets say you have ORDER fact with a SHIPPER column that is the business key for the SHIPPER dimension.   

If the ORDER fact record has not been shipped yet, and thus has NULL for the SHIPPER column, it will get related to the '0' record - which denotes an Unknown for the dimension.     When the fact source gets updated to have a SHIPPER value (e.g USPS) - it would then update to the appropriate dimension id. 

 

If you have a late-arriving dimension scenario for example the SHIPPER has a value of "NEWSHIP" for a new shipper and that business key does not exist in your DIM_SHIPPER dimension,  the data mart processing will relate that fact to the -1 row.  This denotes a missing dimension member in your dimension table.   When the "NEWSHIP" business key arrives for teh DIM_SHIPPER dimension - its dimension row will be created, and the fact record updated to align to the previously missing dimension. 

 

Hope this makes sense as to the processing characteristics and use of the -1 (late-arriving) and 0 (NULL business key) members in the dimension tables.

Once the 'E

View solution in original post

1 Reply
TimGarrod
Employee
Employee

Hello,. this cannot be prevented from happening - these are 'reserved' dimension rows to support late-arriving and 'Unknown' dimension processing.

For example  lets say you have ORDER fact with a SHIPPER column that is the business key for the SHIPPER dimension.   

If the ORDER fact record has not been shipped yet, and thus has NULL for the SHIPPER column, it will get related to the '0' record - which denotes an Unknown for the dimension.     When the fact source gets updated to have a SHIPPER value (e.g USPS) - it would then update to the appropriate dimension id. 

 

If you have a late-arriving dimension scenario for example the SHIPPER has a value of "NEWSHIP" for a new shipper and that business key does not exist in your DIM_SHIPPER dimension,  the data mart processing will relate that fact to the -1 row.  This denotes a missing dimension member in your dimension table.   When the "NEWSHIP" business key arrives for teh DIM_SHIPPER dimension - its dimension row will be created, and the fact record updated to align to the previously missing dimension. 

 

Hope this makes sense as to the processing characteristics and use of the -1 (late-arriving) and 0 (NULL business key) members in the dimension tables.

Once the 'E