Is it advised to only have unique records only in a record type lookup schema? | Community
Skip to main content
SahuSa1
Level 3
November 5, 2024
Solved

Is it advised to only have unique records only in a record type lookup schema?

  • November 5, 2024
  • 3 replies
  • 838 views

Hi,

 

For a Record type custom class lookup schema, will there be any issue if the Primary key field has multiple entries? Is it advised to only have unique records only in a record type lookup schema?

 

For Example- 

custom class - Product

Key Field - Product code

and for one product code, there will be one or more products.

 

Product code - P1 will have 3 products under it, i.e., P1 code will have 3 rows of data in a single batch load. 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by akshaykapil23

Hey @sahusa1 

 

It is advisable to have unique records.

 

You can retrieve the corresponding schema definition for a data record from a schema registry or database.

 

This process is essential for understanding the structure and data types of the record, enabling you to interpret and utilize the data effectively.

3 replies

kautuk_sahni
Community Manager
Community Manager
November 22, 2024

@riteshy18 @atulchavan @ccg1706 @_manoj_kumar_ @akshaykapil23 @sneha-parmar @chetanyajain-1 Request you to please look at this question and share your thoughts.

Kautuk Sahni
Manoj_Kumar
Community Advisor
Community Advisor
November 24, 2024

Hello @sahusa1 If the key is Product Code, then you can't have more than 1 records with the same PK.

Also, Can you please share details on the use case?

Manoj     Find me on LinkedIn
SahuSa1
SahuSa1Author
Level 3
November 26, 2024

Hi @_manoj_kumar_ , Thanks for your reply. 

 

For the use case, there were more than one product code which were mapped to a product group. So a certain product code could have more than one product group mapped to it. In that case, I was not sure how the mapping would happen to a profile. Incase of conflict which product group a particular profile would consider and this would have probably affected segment result.

 

For that reason, we removed duplicates from source and now only distinct records are being ingested to the lookup schema. 

akshaykapil23
akshaykapil23Accepted solution
Level 3
November 26, 2024

Hey @sahusa1 

 

It is advisable to have unique records.

 

You can retrieve the corresponding schema definition for a data record from a schema registry or database.

 

This process is essential for understanding the structure and data types of the record, enabling you to interpret and utilize the data effectively.

SahuSa1
SahuSa1Author
Level 3
November 26, 2024

Thanks @akshaykapil23 , for your reply. Now my understanding is clear