Skip to main content
Submitted

Surrogate keys - Input for default values where we can set DW_Id = -1

  • July 10, 2015
  • 8 replies
  • 3 views

Forum|alt.badge.img

It would be very useful if you could add a default data row for a dimension table in a similar way you add custom data but without getting a custom data table and where you can set DW_Id = -1, which is common. The input ui could be in the same dialog as the custom data input or a separate dialog.

The ways to do it now are either:

1. Creating a post-deploy script for each dimension table where you do SET IDENTITY INSERT ON and then an insert statement with all the values.

2. Adding a new custom field to use as a surrogate-key column, persisting dw_id from staging and inserting default values with custom data option. 


Numer one is very un-DWA and boring to maintain and number two is somewhat going around things to get the desired resaults and having a custom table for each dimension table just to hold the default value is maybe unnecessary.

Attached image is a quick mockup :)

Best regards,
Andri

 

 

 

 

 




default-values.png

8 replies

  • New Participant
  • September 30, 2015

would be even better that you can also specify in some way a default value that should be put in the the other fields : for ex in text fields 'BLANK', numeric / boolean fields '-1' ...  without having to enter a value field by field for such -1 records...this would avoid that when you add a new column in a table that you need to change also this record.  Of course with possibility to overwrite this default with a specific value if wanted.


Forum|alt.badge.img
  • New Participant
  • September 30, 2015

Yes agreed, custom value for this is a must.


Forum|alt.badge.img
  • Known Participant
  • February 28, 2017

I fully agree.

we need something like a custom data window in which we can define the 'dummy' values (more than 1 record) and assign a fixed DW_Id (for the Valid Table).

Since this will be used in Surrogate Key Lookups it would also be nice to extend the lookup functionality with the possibility to assign these dummy values in the lookup as well (e.g. set to -1 if empty, set to -2 if value does not exist)

This should also work for the date-table.

 


  • New Participant
  • March 14, 2017

Forum|alt.badge.img
  • New Participant
  • June 5, 2019

To echo Peter Jensen, it should be possible to do more than one record per table in this way. 

For example, in our particular implementation, I'd want to be able to define three default values, representing the following concepts: 

  1. "this dimension is not applicable to this fact row";
  2. "this dimension is applicable but source data was missing a business key value";
  3. "source data had a business key value for this dimension but it was invalid".

My general impression from experience so far is that these three concepts are actually pretty universal and fundamental. Perhaps fundamental enough that Discovery Hub could have a slightly more specific UI for defining / adding them to dimension tables.

E.g. 3 checkboxes in the Table Settings, that just add the rows for me if I check them. Probably with optional associated config of attribute values, as Kurt D suggests - that is also quite important. In one dimension, I might want the main descriptor attribute to read "Product N/A", "Product Missing", "Product Invalid"; in a different dimension it should read "No Location", "Location Unknown", "Unrecognized Location". (This is a made up example but hopefully gives the gist.) 

Maybe I'm overgeneralizing and these concepts aren't as universal as I think; a more flexible way to add static negative DW_Id rows would still be great :) 


Forum|alt.badge.img
  • Known Participant
  • June 7, 2019

Would absolutely love this feature.  -1 (Missing) or -2 (Unrelated) keys are extremely important in even pretty basic models.  Right now, all the workarounds are clunky at best.  


is there already a better way to do this?


  • Participating Frequently
  • June 21, 2021

Hi Andri

 

Thanks for submitting your ideas. Your continued feedback on our product is very important to us. And so is your engagement in our community.

 

Your input has been passed on to our R&D department for further evaluation.

 

At the time of this posting, the current product roadmap is focused on a major evolution in foundational pieces of our software including splitting the development into ODX, MDW, Semantic Layer, and User Portal. With this evolution, we will continue to see incredible innovation in the product that may exceed your expectations or make the need for this feature obsolete.

 

Don't hesitate to let me know if you have any questions or would like to discuss further.

 

Best regards
Mahmoud Ismail