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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Load file content and filename into database

I am currently trying to use talend to load all text files contained in a directory into an Oracle database.
I want to load the complete content of each of these files into one field, therefor tFileInputRaw seems best suited for me.
Additionally I need to load the source file name into a second column. Can anybody help me on how to achieve this?
The destination table was created with following query:
 
CREATE TABLE message_table (message CLOB, filename VARCHAR(256));
 
Thanks a lot!
Labels (3)
9 Replies
Anonymous
Not applicable
Author

Hi 
Take a look at this KB article, it shows how to iterate all files in a directory and insert them into database. 
Best regards
Shong
Anonymous
Not applicable
Author

Thank you.
The second part of my question is, how do I load the filename together with every filecontent into the database?
Anonymous
Not applicable
Author

tFileList declares a global variable that stores the current file name, for example:
((String)globalMap.get("tFileList_1_CURRENT_FILE"))

You can get the current file name using this variable, so, add a new column and set its expression with this variable. 
Shong
Anonymous
Not applicable
Author

hi alrond, if all your raw files have similar columns then u could finish yor Job like this:

0683p000009MDjF.png  
0683p000009MDbc.png

0683p000009MDfT.png
after, doing the above steps dump all this values into thashouput and do the post job as per the below job design:

0683p000009MDOc.png
output will be :

0683p000009MDjK.png
_AnonymousUser
Specialist III
Specialist III

thank you Talend team!
the article is about inserting a blob in the database, but how to download a blob from db to a specified filepath?
thanks and regards!
_AnonymousUser
Specialist III
Specialist III

nevermind partners!
I found it in ""
_AnonymousUser
Specialist III
Specialist III

Thank you so much for posting this.
A question if I may and I apologize if my post is bumping an old thread, but this is really a agood place to finish what I am trying to do.
 The files I am trying to joinn are named in a pattern xxx_yyyy_zzzz and sometimes xxxx_yyyy_zzzz.
All I want to do is except of having the full name is adding the xxx or xxxx before the first underscore. I am aware that all I have to do is change the expression. But I am such a novice and I really apreciate any help.
Thank you.
Anonymous
Not applicable
Author

Thank you so much for posting this.
A question if I may and I apologize if my post is bumping an old thread, but this is really a a good place to finish what I am trying to do.
 The files I am trying to joinn are named in a pattern xxx_yyyy_zzzz and sometimes xxxx_yyyy_zzzz.
All I want to do is except of having the full name is adding the xxx or xxxx before the first underscore. I am aware that all I have to do is change the expression. But I am such a novice and I really appreciate any help.
Thank you.

Hi  
Can you please describe your requirement with more details in a new topic? I don't understand what you want to do...
Regards
Shong
Anonymous
Not applicable
Author

the link to the article is not working, can you please correct this?