Solved

KAFKA porvides a file. What's next?

  • 2 February 2022
  • 4 replies
  • 2 views

Hi,

The KAFKAConnector works fine und provides me features with a filename "key"and the file itself "value". In my case "value" holds a zip-file with Shape-Layers.

How can I access the features in the zip-Files?

 

The content of "value" starts e.g.:"504B0304140008080800117242540000000000000000000000000C00000036313231396E67722E646266A4BD49AEB5C9921C5622454D04021A68016F2EBC83E89B2121160942608352092047DA8776A389D629B3F81AF76391F578322A1F2A2BF2FEFFBDD74F34DE9A9BFFCBFFE75FFC8B7FF53FFEDDDFFDBFFFC3FFF777DB3FFFCBDFFDDDBFF987BFFF37F77FFD3BFEEB7FFD57DF7FE5BFFCFD3FFC87FFF8F7FFF8F7FFF04FFCF9BFFF87FFEB3FFDDBFF7B2DFF13FFF53....

 

I think, I have to write this somehow to the filesystem. Maybe using the FeatureWriter Format: DATAFILE

And then use the FeatureReader.

 

Any Ideas?

 

regards

Herfried

icon

Best answer by caracadrian 3 February 2022, 07:45

View original

4 replies

Badge +20

Use AttributeFileWriter with "value" as Source Attribute and "key".zip (if it is a zip) to Target Filemane.

Then use ZipExtractor and FeaureReader if you need to access the data.

Userlevel 4

Use AttributeFileWriter with "value" as Source Attribute and "key".zip (if it is a zip) to Target Filemane.

Then use ZipExtractor and FeaureReader if you need to access the data.

Or simply read the data directly from the zip, if the format reader supports it (most file-based readers do).

Badge +20

Or simply read the data directly from the zip, if the format reader supports it (most file-based readers do).

Thanks for reminding me of that option!

Thank you for your help.

The AttributeFileWriter and FeaureReader work fine and I will go with that.

 

Maybe one day there will be a solution without a detour over the filesystem.

 

Reply