I am working on a custom transformer, where one of the input parameters is based on columns in a PostgreSQL table. Initially I wanted to give the user freedom to choose the database connection, schema, and table name... After playing around with the POSTGRES reader I had to realize that the table name seems impossible to alter afterwards - I can live with that.
I am still struggling with the list of choices that I want to generate from the database table columns.
Is there a possibility in FME to retrieve the column names of a database table before I run a workspace? If one can do that with Python, then that's fine for me, but at the moment I cannot see how to do this. psycop2 isn't part of the Python in FME (afaik) and using FMEs own modules I do not know how to do it.
Do I have to use fme.macroValues or can it be done using fmeobjects.getAllAttributeNames? And how to reference the PostgreSQL table in the script?