Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, i am new in using Talend.
I have a java class that call gmail api and return the emails. Then i want to insert the emails to the database (Oracle). How to map the email object that returned from java code to Database?
Thank you for your answer.
However, i need to do some formatting, transform and processing email content also get all email information such as from, to, in-reply-to, etc with java code so I think I still need using java code then insert the processed data to DB. Is there any way to mapping between java object and oracle? What component i need to do this job
Here is the scenario i want:
1. Call Gmail Api and get list of email threads then process it, then return processed List<Thread> (each email thread contain information such as thread id, messages etc)
2. Loop and mapping each Thread to insert it to DB (one thread one row, example Thread A become insert into table_x (threadId, messages, etc) VALUES (A.getThreadId(), A.getMessages(), etc)
Ok, thank you for your answer.
I will try it.
Hi, i have successfully insert to database from java component using:
tJavaFlex -> tMap -> tOracleRow
However, I need to insert the data into three table in one transaction in this sequence:
1. Table Master
2. Table Detail
3. Table Email (Have foreign key from table Master I)
So, I have two question:
1. How to pass the sequence id that got from successfully inserted Master table to the Table Email?
2. How to rollback other success transaction if there is one failed transaction in one table?
What component that I can use for this scenario?
So, what is the best way for rollback one record as one transaction? Is there any way to group three tOracleRow into one transaction?
For this case i will try to use begin/end transaction query to group them in one transaction.
However, i have another problem. How to correctly get value from tMap in tOracleRow?
This is my schema
The thread Id in row1 and email is correct but after insert, the value in DB is become "165" not "165...". I use String type data in Tmap and my query code is:
"Insert INTO ...." + email.threadId + "," + "...."
If I insert manually with my query to the database, the data is correctly added with same value.
Is it because type of data in email.threadId become number? How to correctly call the data from tMap variable?