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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Fk (Constraint error) - "Cannot add or update a child row"

Hi, everyone! Did anyone ever come across this problem? I'm trying to insert data into my dw.

I already disabled my FKs on my data warehouse. But it won't go anyways.

 

Here's the error:

 

Cannot add or update a child row: a foreign key constraint fails
(`dw_bi_web`.`fact_lancamento_contabil`, CONSTRAINT `fk_fact_lancamento_contabil_dim_conta_contabil1`
FOREIGN KEY (`dim_conta_contabil_sk_conta_contabil`)
REFERENCES `dim_conta_contabil` (`sk_c) [statistics] disconnected Job carga_fato_contas ended at 11:11 12/04/2018. [exit code=0]

 

 

Thanks!

Labels (2)
17 Replies
TRF
Champion II
Champion II

Probably the field corresponding to the foreign key is empty or null when your job push the data flow to the DB.

Can you check this point?

Else can you share your job design with settings for the DB component and maybe any tMap before this component?

Anonymous
Not applicable
Author

No, there's no "Null" rows on my dimension, nor on my origem table. That's a "not null" column on my DBs.

manodwhb
Champion II
Champion II

You need to set default value if the business keys are not between source and dimension when you populate data into fact table
Anonymous
Not applicable
Author

But there are matches, and even tough it's putting as null.

manodwhb
Champion II
Champion II

@isadoralmeida06,your sure about the data then you might have configure wrongly that lookup.please check.

Anonymous
Not applicable
Author

Lookup is fine, all others are working in the same particular job, except this one.

I honestly think it's a talend issue, I don't think it can verify if long texts columns from differents sources match.

I fixed with a workaround...thanks anyways.

manodwhb
Champion II
Champion II

How you fixed,do you used tjoin instead of tmap?
Anonymous
Not applicable
Author

It happens to me just like you. But I got the "[statistics] disconnected"

For what is this? and some solution