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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Update tables from CSV to MySQL when imported with dynamic schema

Hi there,

 

I am trying to update rows/values of a table where changes (modified/added/deleted) has been been made without rewriting data for the whole table.

If possible, I want the update process to work in the following way. 

I think a key is needed here, but is it possible to do it without making changes to the existing table?

 

 0683p000009M9wu.pngOrigin table0683p000009M9wz.pngChanges (CSV Upload)0683p000009M9vJ.pngExpected Result

 

With the job design below, I can create tables and import it to database, though it doesn't work with update.

** I used dynamic schema when mapping input and output. **I added one dynamic column in the schema.

0683p000009M9rq.pnginput

It works well with insert, but not for update as a key is needed.

Exception in component tDBOutput_2 (test02)
java.lang.RuntimeException: For update, Schema must have a key

However, not all tables have keys and I can't make changes to the source tables, as it's a company data.

Is there a way to make this work?

 

0683p000009M9x4.pngtMap0683p000009M9go.pngoutput

 

Please let me know if you have any question.

 

Thanks alot!!

Labels (3)
10 Replies
Anonymous
Not applicable
Author

@manodwhb 

That's a different case.
What I mean now is the initial case I asked when starting this thread.

1st Case: Multiple tables with one key (dynamic schema)
2nd Case: Multiple tables with one primary composite key (dynamic schema)

**If you know how to make the 2nd case work, please let me know. Thank you