Question

PostGIS Feature Reader not Dynamically bringing postgis attributes

  • 27 July 2020
  • 1 reply
  • 1 view

I have a list of postgis tables and their schemas coming from a python caller. I want to dynamically read all the postgis layers and export them. However I cannot get the layer attributes to come through - only the geometry comes through in the feature reader.

I'm passing the schema.table as an attribute called datasetName into the "Feature Types to Read". See below the inspector giving a valid value.

 

When running I don't get the attributes that I expected along with the geometry:

 

If, however, I paste in the text that I generated for the datasetName, i.e: o6_energy.bgs_eng_gas_goodcbmpotentialgbv1_bgs_bsln

Then it creates a new port with the attributes I wanted:

 

 

Hey presto, the attributes are there:

 

Can I not dynamically provide the datasetName and get the geometry + attributes to come out of a single predictable port?

Note it's not coming out of the generic port anymore, it's created another port with the dataset name. This is massively inconvenient as- as it iterates through the datasets I would need to somehow connect the new port to the rest of the process. I played around with the Output Ports and can't figure it out.

 

However, all that is academic as I can't get it to read the datasetName and retrieve the attributes anyway.

 

any ideas?

thanks


1 reply

Badge +2

@alexanderallan Have you tried viewing your data in the Feature Information window in Visual Preview or Data Inspector? I think you find that the attributes are on the <Generic> features, just not added to the workbench schema which is what the Table View displays. You can expose the attributes you need to access in workbench (AttributeExposer) but the attributes will be written out if they are on the writer feature type schema.

 

Reply