[resolved] error when I try to deploy the data model after i set the foreign key

Highlighted
One Star

[resolved] error when I try to deploy the data model after i set the foreign key

I get an error when I try to deploy the data model after i set the foreign key:
"FK field 'REF_VAL_CD' is invalid because it isn't typed as string (nor a string restriction)."
I'm successfully created and deployed a view into and mdm server but the I'm having issue setting the foreign key on the data model between the two tables so that the child table will include the parent table attributes as a Pick-list that pops up for the mdm users.
I checked and both "ref_val_cd" fields (in parent and child tables) are set as type string.
I attached some screen shot to help explaining the issue.

Accepted Solutions
Highlighted
Employee

Re: [resolved] error when I try to deploy the data model after i set the foreign key

Hi,
To answer:
Is it compulsory for the B's "A_ID" to be a string, although A's "A_ID" is an integer?

The quick answer is "yes". This is because B's "A_ID" may contain square brackets (this a Talend MDM convention for foreign key values) so even if A's "A_ID" is an integer (this perfectly fine), the B's FK needs to be string to accept values such as "" (otherwise you would have a validation error for the value in B since '' are not a valid characters for integers).

View solution in original post


All Replies
Highlighted
Moderator

Re: [resolved] error when I try to deploy the data model after i set the foreign key

Hi,
Could you tell us what the build version you're using?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
One Star

Re: [resolved] error when I try to deploy the data model after i set the foreign key

Talend Platform for MDM 5.4.1
Highlighted
Employee

Re: [resolved] error when I try to deploy the data model after i set the foreign key

Please report a bug on Jira (jira.talendforge.org) and attach your data model to the Jira (use 'Protected view' if you attach a data model you don't want to be seen by everyone).
Highlighted
Moderator

Re: [resolved] error when I try to deploy the data model after i set the foreign key

Hi tal_cohen,
I would suggest you to connect to the Support portal and ask our support colleagues to log a jira issue for you with high priority, through the support cycle.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
Employee

Re: [resolved] error when I try to deploy the data model after i set the foreign key

This is issue is described in https://jira.talendforge.org/browse/TMDM-7214 and is fixed for next scheduled 5.4 release (5.4.2).
Highlighted
One Star

Re: [resolved] error when I try to deploy the data model after i set the foreign key

I was having this same issue in 5.4.1 and upgraded to 5.5.0 am still having this issue when I try deploying the container. Is this not resolved in the 5.5.0 version?
Highlighted
Moderator

Re: [resolved] error when I try to deploy the data model after i set the foreign key

Hi,
This jira issue is fixed on 5.4.2, 5.6.0.
You'd better open a support ticket on Talend Support Portal to ask for a solution for your current build version. Our Colleagues from support team will see if it is possible to give a patch to you.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
One Star

Re: [resolved] error when I try to deploy the data model after i set the foreign key

Hi,
I am having a similar issue when saving my Data Model, for which:
- Table A has "A_ID" integer as its PK
- Table B has "A_ID" integer as its FK, linked to A's PK
When saving, the message "FK field 'A_ID' is invalid because it isn't typed as string (nor a string restriction)" shows up.
Is it compulsory for the B's "A_ID" to be a string, although A's "A_ID" is an integer?
Highlighted
Employee

Re: [resolved] error when I try to deploy the data model after i set the foreign key

Hi,
To answer:
Is it compulsory for the B's "A_ID" to be a string, although A's "A_ID" is an integer?

The quick answer is "yes". This is because B's "A_ID" may contain square brackets (this a Talend MDM convention for foreign key values) so even if A's "A_ID" is an integer (this perfectly fine), the B's FK needs to be string to accept values such as "" (otherwise you would have a validation error for the value in B since '' are not a valid characters for integers).

View solution in original post

Highlighted
One Star

Re: [resolved] error when I try to deploy the data model after i set the foreign key

Hi fhuaulme,
Thanks for the explanation!
Regards,
Jordi

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Have you checked out Talend’s 2019 Summer release yet?

Find out about Talend's 2019 Summer release

Blog

Talend Summer 2019 – What’s New?

Talend continues to revolutionize how businesses leverage speed and manage scale

Watch Now

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog