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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

binary files

I want to use a binary file as an input and then load in a postgreSQL database. The binary file has the following format when converted to ASCII
Name Marc
ID 00000000
Age 30
The type and size in bytes of each field are already specified.
what type of file in the metadata section in the repository do I need to use to specify the schema of the binary file
Thank you for your help
Labels (2)
6 Replies
Anonymous
Not applicable
Author

Hello
See 3403
Best regards

shong
_AnonymousUser
Specialist III
Specialist III

the link is dead, where was pointing.
I need to migrate binary files (pdfs, txt,...) into a Postgres Database (bytea). How does this work, is it even possible?
Anonymous
Not applicable
Author

I've the same question. Has someone an idea?
Ragrds,
Billy
Anonymous
Not applicable
Author

I've the same question. Has someone an idea?
Ragrds,
Billy

Hi Billy
This post is a little old, can you describe your request with more details?
Best regards
Shong
janhess
Creator II
Creator II

I use this routine to put binary images into a MYSql database
package routines;
import java.io.FileInputStream;
import java.io.File;
import java.io.FileNotFoundException;
public class ImageUtil {
public static byte[] getByte(String filepath) {
byte[] b=null;

try {
FileInputStream fis = new FileInputStream(filepath);
b=new byte;
fis.read(b);
} catch (Exception e) {
e.printStackTrace();
}
return b;
}
}
In a tMap I then call it on the output using ImageUtil.getByte(file_path) where file _path is the full file path to your file. The output column is a byte array byte[]
Anonymous
Not applicable
Author

Hi
If the data is the file path of binary file, janhess's solution is good.
If you are migrate binary file from database to another database, set the type as byte[], db type as Blob or Clob on the schema of input/output db component.
Best regards
Shong