Reading a binary file with SSIS

2.2k Views Asked by At

We have a binary file (from a telecom system). Can SSIS read it?

From what I have read about Raw File Source, it can only read files created by Raw File Destination. Is that correct?

3

There are 3 best solutions below

0
On BEST ANSWER

The answer at this time is that SSIS cannot read a binary file that is not formatted in the same way as a file produced by Raw File Destination.

You could use create a Custom SSIS Component Class and register it for use in SSIS.
Developing a Custom SSIS Source Component Not for the faint of heart.

Another way would be to write a program to convert the binary file into a file that can be read by SSIS or load the output into a database table. So much for what SSIS can do for you.

0
On

Raw File Source

From the Raw file source official documentation::

The Raw File source reads raw data from a file. Because the representation of the data is native to the source, the data requires no translation and almost no parsing. This means that the Raw File source can read data more quickly than other sources such as the Flat File and the OLE DB sources.

The Raw File source is used to retrieve raw data that was previously written by the Raw File destination. You can also point the Raw File source to an empty raw file that contains only the columns (metadata-only file). You use the Raw File destination to generate the metadata-only file without having to run the package

You can check an exmaple of the usage of Raw files at the link below:

Reading binary data

I think in SSIS, you should use a Script Component as source (Within a data flow task) to deserialize binary and implement your own logic to generate output columns.

You can check the following links to get more insights:

Script component as Source

Converting binary to string using C#

3
On

Yes, the Raw File in SSIS parlance is a proprietary binary format aimed at primarily reducing speed of load, portability and size which can only be produced and consumed by the SSIS engine.

To be able to read a binary file in SSIS it needs to be pre-processed. What I mean is that you need to obtain documentation on what is the proper procedure to extract data from it.