Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I would like to insert excel to mysql when column at table1(just input excel filename) doesn't contain excel filename, if doesn't exist then table2(input all data/rows) can be executed. i don't know how to create the condition. please, any suggestion?
thanks.
Your question is not quite clear. What table 1 and 2 means?
What condition do you mean? SQL?
Please add more context to your question.
As a suggestion: It is always a good idea to monitor the files importing. For such use cases I usually create a table in which I add per file one record which fields describing the file and the current process state (perhaps with additional timestamps).
I register a file in such a table and another Talend job starts reading the file and import the date (or replace them completely).
The other table(s) containing the excel data combined with a key from the file monitoring table (e.g. a surrogate key identifying the file record).
i'm using mysql as db, in that db i have two table. Table1, i want to used it to only save summary of excel file that contains column to save excel filename that have unique value. Table2, i want to used it to save all rows/datas in that excel file.
So, the conditions is :
first i read the excel file and then checking to table1 : if table1 donesn't contain excel filename then data from the excel file can be stored to table2. But, if table1 contain excel filename then data can not be stored to table2.
Thanks, for replying my question. Can you help me what must i do?