You are here: FME Workbench > Separating Output Data with Fanout > Setting Dataset Fanout

Setting Dataset Fanout

See About Fanout for more information on dataset fanout.

See Setting Feature Type Fanout for more information on setting feature type fanout.

Steps

  1. In the Workspace Navigator, double click the Fanout Dataset advanced writer parameter.

  1. An Edit Fanout Dataset Parameters dialog opens.

Fanout Dataset: Select Yes

Fanout Directory: Browse to the destination folder for the files.

Fanout Prefix: Enter a common prefix, if desired, for the output files.

Attribute to Fanout on: Choose the attribute from the drop-down list.

For example, you want to perform a dataset fanout in Shape format, and three features are output: one has a roadType equal to gravel, and two have roadType equal to paved. If you have a prefix c:\data\, you will end up with feature types in two folders: c:\data\PAVED\ and c:\data\GRAVEL\. The output Shapefile names will be based on the output feature types specified in the workspace.

Note: If attribute values have the same name, but the filenames are different letter cases (upper-/lowercase letters), then, in a Windows environment, the previously created file will be overwritten by a subsequent writer on a Windows machine.

For example, say there are two input source filenames and the only difference between them is that one is lowercase (3s1w35.dgn) and one is uppercase (3S1W35.dgn). With dataset fanout, you will get two unique values. Because FME creates two different writers during the translation, the second writer will overwrite the file created by the first. This is because on Windows, filenames are case-preserving but also case-insensitive for various operations. To avoid this, add a StringCaseChanger to the workspace to make sure the attribute names are consistent.

Fanout Suffix: The suffix identifies the output file extension. If the suffix is blank, this means that nothing will be added to the end of the dataset.  For instance, folders will consist of just the prefix and the fanout attribute value.

Combining Feature Type and Dataset Fanouts

You can combine Feature Type and Dataset Fanouts.

For example, if you are working with a folder-based format and you perform a feature type fanout on attribute A and a dataset fanout on attribute B, then you'll end up with multiple folders of files, with the filenames dependent on the values of attribute A.

Dataset Fanout and Temporary Disk Storage

Note that a Dataset Fanout can have a huge impact on temporary disk storage, since there is no guarantee that features arrive at the fanout in a single dataset group. Therefore, FME has to write all of the datasets to temporary storage then fan them out afterwards.

Feature Type Fanout has no similar issues, so you may get away with it if your destination format is folder-based.