Skip to main content

I have a workflow where I am trying to write out a MapInfo file dynamically.

When using a normal Writer the file writes out correctly as per the schema I have told the writer to reference. The attributes are written out in the order as prescribed in the schema. Within the Writer, in the "User Attributes" tab the Dynamic option is selected and there are no attributes listed here (as they are supplied from the schema of the Workspace Resource I have added). This works and makes sense:

However, I would like to use a FeatureWriter instead of the standard Writer as I need the translation to continue on, as I use the Emailer to confirm that the workspace has completed successfully. In the FeatureWriter I have the same options as I would use in the Writer selected, and the FeatureWriter is referencing the same Schema Source::

In the "User Attributes" tab the Dynamic option is selected but the Attributes still appear and the attributes write out in the order they go into the FeatureWriter, not the order on the schema. I could manually re-order them so that it Writes out in the correct order, but that would negate the point of trying to do it dynamically via a schema resource.

 

I suspect i'm missing something obvious, but i've been staring at this for a few hours now and i'm going round in circles! :)

Thanks all.

Jeff.

Hi @juffers, since the Automatic mode is set by default in the FeatureWriter, static user attributes will be added automatically if you connect its input port to a reader feature type or a transformer before configuring dynamic schema. Workarounds are:

  • Configure dynamic schema before connecting.
  • Or, just remove all the static attributes manually on the User Attributes tab.

Hi @juffers, since the Automatic mode is set by default in the FeatureWriter, static user attributes will be added automatically if you connect its input port to a reader feature type or a transformer before configuring dynamic schema. Workarounds are:

  • Configure dynamic schema before connecting.
  • Or, just remove all the static attributes manually on the User Attributes tab.
Hi @takashi,

 

 

ahh I see. I was expecting that because I had the Dynamic Schema Definition option ticked it would automatically override the static user attributes from the input port.

 

 

I just removed the attributes in the User Attributes tab as per your second workaround and it works fine now. The simplest solution is often the one you overlook!!

 

 

Thank you for your help.

 

Regards,

 

Jeff.