Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[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.
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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

10 Replies
Anonymous
Not applicable
Author

Hi,
Could you tell us what the build version you're using?
Best regards
Sabrina
Anonymous
Not applicable
Author

Talend Platform for MDM 5.4.1
Anonymous
Not applicable
Author

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).
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

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).
Anonymous
Not applicable
Author

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?
Anonymous
Not applicable
Author

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
jsalvador
Contributor
Contributor

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?
Anonymous
Not applicable
Author

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).