datatype of compressed data.

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
kalpna
Premium Member
Premium Member
Posts: 78
Joined: Thu Feb 02, 2006 3:56 am

datatype of compressed data.

Post by kalpna »

Hi!
Can anyone tell me what is the sql datatype for compressed data??

Thanks
Kalpna.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Define what you mean by 'compressed data'.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

How about VarBinary or LongVarBinary ?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
kalpna
Premium Member
Premium Member
Posts: 78
Joined: Thu Feb 02, 2006 3:56 am

Post by kalpna »

kumar_s wrote:How about VarBinary or LongVarBinary ?
No! tried both!! it doesn't work

Thanks
Kalpna
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Probably there is a seperate utility to Unzip MQ compressed XML files.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kalpna
Premium Member
Premium Member
Posts: 78
Joined: Thu Feb 02, 2006 3:56 am

Post by kalpna »

DSguru2B wrote:Probably there is a seperate utility to Unzip MQ compressed XML files.
No! its not MQ compressed data..its of gzip.
kalpna
Premium Member
Premium Member
Posts: 78
Joined: Thu Feb 02, 2006 3:56 am

Post by kalpna »

adding to that..

when i use bit datatype and try unzipping it..
it says..
unexpected end of file..
does that mean it recognised the format..now.
same with unknown datatype.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Can you uncompress the same file using the mentioned command from command prompt with out any issue?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
kalpna
Premium Member
Premium Member
Posts: 78
Joined: Thu Feb 02, 2006 3:56 am

Post by kalpna »

kumar_s wrote:Can you uncompress the same file using the mentioned command from command prompt with out any issue?
i am passing the compressed file(using gzip) to the quque from command line only..(for testing)
MQ does not change the content...
but, when i get the same message from the queue, (there i need to define the datatype)..the output is different from datatype to datatype.

i know! it happens when you try to convert binary to string..etc..

but, what is the data type with which we can handle compressed data?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

compressed data is binary. The first bytes of the file determine what the type is, so in your case the first packet (and most likely all subsequent ones) are being mangled. Can you output the mqseries compressed data straight to a unix file without using datastage? I am willing to bet that it isn't coming in correctly there, either. Binary datatypes in DS mean that the data is not modified in any way.
kalpna
Premium Member
Premium Member
Posts: 78
Joined: Thu Feb 02, 2006 3:56 am

Post by kalpna »

ArndW wrote:compressed data is binary. The first bytes of the file determine what the type is, so in your case the first packet (and most likely all subsequent ones) are being mangled. Can you output the mqseries compressed data straight to a unix file without using datastage? I am willing to bet that it isn't coming in correctly there, either. Binary datatypes in DS mean that the data is not modified in any way.
Arnd!
I tried retreiving message directly from queue to unix box.
it works fine..and I'm able to unzip it.

Thanks
Kalpana.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I'm at loss in that case; I don't know why you are getting mangled data. Can you work around it by copying and gunzipping outside of DataStage?
kalpna
Premium Member
Premium Member
Posts: 78
Joined: Thu Feb 02, 2006 3:56 am

Post by kalpna »

ArndW wrote:I'm at loss in that case; I don't know why you are getting mangled data. Can you work around it by copying and gunzipping outside of DataStage? ...
Tried in Unix, tried in windows (as gzip and win zip are compatible)
works fine..
but, not the output from datastage...?? :(

Kalpna.
kalpna
Premium Member
Premium Member
Posts: 78
Joined: Thu Feb 02, 2006 3:56 am

Post by kalpna »

I tried without MQ..
I mean.., i took a file zipped it(GZip), passed through the transformer with the data type binary and wrote to a file with extension .gz.

it does not recognise it as gzip format..

Any clues!!!! :( :!:

Thanks
Kalpna.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

kalpna wrote:I tried without MQ..
I mean.., i took a file zipped it(GZip), passed through the transformer with the data type binary and wrote to a file with extension .gz.

it does not recognise it as gzip format..

Any clues!!!! :( :!:

Thanks
Kalpna.
What is the stage you use to read and write?
You can try using ComplexFlatFile and mark the Record Option - Data Format as Binary.
Same in the target.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply