Skip to main content

My duty is to read multiple CSV-Files my means of HTTPCaller from an online source into an attribute each, subsequently zip the CSV-file inside the very attributes, and finally write the binary attribute content (zipped CSV) to a PostgreSQL bytea-Attribute.

I know how to read the HTTP source and write into the bytea destination attribute.

QUESTION: How am I to zip a CSV-file inside a binary BLOB FeatureType attribute within the FME Desktop Workspace.

Hint: I tried to use the ZipArchiver, but that one needs a file as source, as well as destination, but wouldn't work on attributes.

 

Many thanks for any effort!

It's not exactly what you asked for, but hopefully it can give you some ideas: https://knowledge.safe.com/questions/82001/how-to-convert-csv-data-in-a-single-attribute-to-a.html

Basically, either use the TempPathnameCreator + AttributeFileWriter to write the CSV contents to file before zipping it with the ZipArchiver and reading it back with the AttributeFileReader, or using Python to do the same thing in-place.


Reply