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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
nivedhitha
Creator III
Creator III

Store a file in a varbinary DB field of sql server

Hi everyone,

 

I have a table with schema as shown below0683p000009M2fn.png

I have to save my source file(.xlsx) in the Mapping_Document_File field. Please provide me suggestions as to how to achieve this

 

Labels (2)
1 Solution

Accepted Solutions
DataTeam1
Creator
Creator

Here you can see an example how to achieve this

 

Inserting BLOB or CLOB data into a database

View solution in original post

8 Replies
DataTeam1
Creator
Creator

Here you can see an example how to achieve this

 

Inserting BLOB or CLOB data into a database

Anonymous
Not applicable

Hi,

 

    While you can load the file to the database, why didn't you question the designer for following this approach? Now, we are having modern cloud storage facilities like S3 where we can store the files in most secured fashion with minimum cost. Ideally it should be the approach instead of pushing the files inside DB.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

nivedhitha
Creator III
Creator III
Author

Hi @DataTeam ,

 

Thanks for your reply. 

I tried doing it but what gets inserted into the table is a sequence of strings rather than my xlsx file.

The datatype of the field in my SQL Server table is Varbinary.. and if I import the schema in the Dboutput component, the type is object and the datatype is varbinary. so I copied the same schema to the output of tMap and followed the same steps as the link you provided.

And the output is 0683p000009M2hA.png

Attaching the screenshots of tmap and dboutput

Schema as imported by dboutput component

0683p000009M2gr.png

 

tmap

0683p000009M2hF.png

 

Please let me know what is the issue here. 

thanks in advance

nivedhitha
Creator III
Creator III
Author

Hi,

 

Does someone have any suggestion for me?

Appreciate any inputs.

 

Thanks

DataTeam1
Creator
Creator

@nivedhitha I promise come back to your issue next week because now I have many other task to do in my work.

 

Until then maybe @nthampi can help you.

nivedhitha
Creator III
Creator III
Author

@DataTeam ,

 

Thank you. Looking forward to your suggestion.

DataTeam1
Creator
Creator

Hi @nivedhitha sorry for my absece.

 

Write me what do you want to store in database.

I suppose you want to have xml string (content of xml file) instead of xml as binary format.

 

 

nivedhitha
Creator III
Creator III
Author

@DataTeam ,

 

Thanks for getting back.

Yeah right I want the file itself to be saved onto database. But my routine now just inserts a string.

Any suggestions/corrections?