foreign key insert to a different table in mysql

One Star

foreign key insert to a different table in mysql

I have a job where the job reads data from excel sheet and insets data to a mysql table. Let's say that it inserted 25 rows in Table "A". In table "A", I have one column as 'run id' which inserts a unique uuid for every job run. So, for all the 25 rows it inserted in a single run the 'run id' column has the same uuid value. I wanted to insert a single row into another table- "Table B" where "run id" column acts as foreign key between "Table A" and "Table B". How do I insert a single row in "Table B" for every job run, while inserting 25 rows in "Table A"?

Moderator

Re: foreign key insert to a different table in mysql

Hi,
Could you please elaborate your case with an example with input and expected output values?
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.

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download