Forum Discussion
16 Replies
- j_angelevskiContributor III
Hi @kkishore,
Place a Mapper between those two snaps and change the
$['content-location']
header and be sure to select the'Pass through'
option in the Mapper.Expression: $['content-location'].split("/")[$['content-location'].split("/").length - 1] Target path: $['content-location']
This will remove the folder structure in the zip file.
- kkishoreNew Contributor III
Thanks for the response, I will try and let you know the results
- j_angelevskiContributor III
The Mapper snap supports Binary Input/Output, you just need to select it from the Views tab in the Mapper.
- kkishoreNew Contributor III
I got it, thank you very much.
- kkishoreNew Contributor III
Thanks for the great support, It is working fine(removed folder structure), but i noticed one thing is when unzipped file the file is created like textbook…bin(inside the zip file).
expected file name is textbook.it was there when created zip file with folder structure(source file path) also
- j_angelevskiContributor III
Can you provide the output of the file reader ? Or just show me the
content-location
header.- kkishoreNew Contributor III
Please find the here,
- j_angelevskiContributor III
Sorry, but can you provide the
x-amz-meta-mimetype
header also ? If this is a .txt file try opening the file with Notepad to see if it opens and displays the data is it should.- kkishoreNew Contributor III
File reader doesn’t show any x-amz-meta-mimetype when i validated.
I shared all the content showing by file reader in the screen shot earlier post
- j_angelevskiContributor III
And what type of file is this ? Is it .txt or something else ? What type of file are you reading ? What’s the
content-type
in the sftp server ?- kkishoreNew Contributor III
There is no extension for the file in the source system(reading file from source using file reader through sftp ). it is not txt file,but we can open with notepad or textpad
sample file name is : xyzdata
- j_angelevskiContributor III
I’m not really sure why it adds the …bin after the filename. Can you check the output after the Mapper and see if some extension is added unintentionally ?
- kkishoreNew Contributor III
- bojanvelevskiValued Contributor
I think the problem is that the ZipFile Writer , automatically detects that the incoming file has a binary structure, and adds .bin at the end. You can try and add a custom content-type header in the mapper, along with the content-location: