I downloaded TalendOpenStudio 2.2.2 to evaluate if it can satisfy some of our business use cases.
I have a use case to pull emails from a pop3 server and insert them in a database table (table which has columns to store separate fields of emails such as "to email", "from email", content, header, subject etc). I found some samples which indicate that I can do this by using tPop node, which will dump the email in a file, and then I read email from file in a tFileInputMail node, which can then be connected to a tMssqlOutput node.
My use can also requires me to insert additional records in database, when an email is received (these records may not contain any data of the email received, but some other data).
However, I am a bit confused about how to map emails fields to database columns. Has anyone tried this before?
In addition to this, is there a way by which I can move email directly from tPop into one of databases, without storing the email in a file?
Any help is highly appreciated
Hi
You can use tFileInputMail component to get datas from email and store in database. Please see the screenshot.
In your database, define a table with the same fileds as the schema defined tFileInputMail.
Best regards
Hi all,
I want to retrive the files which would send to mail for every 10min and store in Database. How could I do it?
Please tell me the procee flow..
tFileInpumail--->tMssqlOutput
If I use above flow Does it works?
Please anyone reply me.
Thanks in advance.
tPrejob-->tDBConnection tPop--> OnSubjobOk--> tFileList-->tFileinputMail-->tJavarow(ContextVariables) OnSubjobOk--> tFixedFlow-->tMSSQLOutput Use routine to convert file into the bytecode or text contents to insert file into the database table Vaibhav
Hi
Vaibhav has indicated that how to achieve this kind of demand, but your requirement is not clear.
Can you describe your request with more details? Do you want to extract data from the file and store the data into database or you want to store the whole file as a Blob data in database?
Best regards
Shong
Thanks for reply What is blob i don't know? But my requirement is, we'll get the files into mail for every 5min, the data which is there in files must be stored into Database.
In case if you are inserting attachment in single column, then the job of routine is to read the file contents, convert it to appropriate data type and make it available for insertion... both different methods are available in above url. Vaibhav