DataConnectors icon indicating copy to clipboard operation
DataConnectors copied to clipboard

Guidance on decorating table types with key details

Open bgribaudo opened this issue 2 years ago • 2 comments

Hi,

Using Table.AddKey/Table.ReplaceKeys, it's possible to annotate the type returned by Table.View's GetType() handler with key information. To help us better understand when/what key information to provide, can you give us a sense for how Power Query uses this information?

In particular, I'm curious whether it's advantageous to decorate a table type with non-primary key information (e.g. to do Table.AddKey(..., ..., false). Does providing non-primary key info help influence the folding that M may attempt? Is it okay/helpful to set non-primary key details for non-unique keys or should its use be reserved only for unique non-primary keys?

Thanks, Ben

bgribaudo avatar Jul 13 '21 13:07 bgribaudo