Question

Set writer feature type name dynamically (no fanout)

  • 13 February 2015
  • 2 replies
  • 1 view

Badge

Hi All,

 

I have a workbench that I'm calling with a WorkbenchRunner. I want to be able to set the output filename (it's a CSV writer) dynamically, based on a parameter. There will be one unchanging filename per run of the workbench.

 

 

But I do not want to use a Fanout because it caches results to RAM/disk and sorts them before writing at the very end. This is a problem because the datasets I'm processing are too large to want to do that, and as noted, there's no need as there's only one filename.

 

Is there a way to do this? Maybe with Python?

 

 

(I've already put in a request for a "features are ordered by group" option on the fanout, which would solve this problem)

 

Thanks,

Jonathan


2 replies

Userlevel 2
Badge +17
Hi Jonathan,

 

 

You can enter the parameter (macro) name directly to CSV File Name (Feature Type Name) parameter of the writer feature type. For example, if you define a published user parameter named "DEST_FEATURE_TYPE", this setting is possible:

 

 

 

Then, you can pass a preferable feature type name (file name) to the parameter through the WorkspaceRunner for each run.

 

 

Takashi
Badge
Hi Takashi,

 

Thanks; that did exactly what I want!

Reply