Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Ways to remove Synthetic keys

Hi,

I want to remove synthetic keys.

renaming fields,using qualify I know..I want some other solutions

1 Solution

Accepted Solutions
Not applicable
Author

May i ask why you need other solutions than renaming fields?

What do you want to achieve with another solution?

As long as you have several fields with the same name in the tables, you will get synthetic keys.

/Martin

View solution in original post

5 Replies
Not applicable
Author

May i ask why you need other solutions than renaming fields?

What do you want to achieve with another solution?

As long as you have several fields with the same name in the tables, you will get synthetic keys.

/Martin

Not applicable
Author

You can create a fact table containing both (or more) key fields

Then create a key of combined field using autonumberhash128(Field1,Field2) for example.

FactTable:

LOAD autonumberhash128(Field1,Field2) as %Key,

Field1,

Field2

resident MyTable;

MyTable2:

LOAD autonumberhash128(Field1,Field2) as %Key,

Field3,

Field3

resident MyTable;

drop table MyTable;

Rgds,

Not applicable
Author

If we have more synthetic keys then renaming may not be easy for that any other solution or comment

christian77
Partner - Specialist
Partner - Specialist

Hi:

Try to concatenate 2 fields in one, that way you´ll have only 1.

Rename the 2 simple fields differently to filter later on.

Not applicable
Author

If the data is large then...............