CSV User Attributes

Readers: For information on the parameters in this dialog that are common to all readers, see:

Writers: For information on the parameters in this dialog that are common to all writers, see:

Usage Notes

  • Selecting the option All Attributes overrides the content shown in the workspace's User Attributes table. Rather than reading the displayed attributes, that information is discarded, and FME will read the attributes it finds in the dataset.
  • Since the reader cannot know in advance what the schema is, the actual schema is determined by the Schema Generation options. In the Reader Parameters, there is an option to Scan for Types. By default, this option is set to Yes, so the reader will try guessing the type of each attribute (including x, y, and z_coordinates), even when reading All Attributes.
  • When the CSV reader is added as a Merged Feature Type, All Attributes is the default setting. In this case, manually specifying Feature Types to Read may improve performance.

User Attribute Types

The following table shows the supported attribute types.

Name

The name of the file to read from or written to.

Type

This format supports the following field types. (For more information, see FME Data Types).

Note that attributes written to CSV will always be stored as strings. Selecting a non-string type simply ensures that the value written will be compatible with the selected type. For example, the uint8 type supports integer values between 0 and 255. If a feature has a value of 300 for an attribute with a uint8 type, the value will be written as an empty string.

  • boolean
  • date
  • datetime
  • int8
  • int16
  • int32
  • int64
  • number(<width>,<precision>): Number fields store single and double precision floating point values with a field width of width and precision decimal points. Values will not be truncated. The width and precision parameters are only valuable if the features will be passed to another format that requires this information.

  • real32
  • real64
  • string
  • time
  • uint8
  • uint16
  • uint32
  • uint64
  • varchar(<width>): Character fields store fixed-length strings. The width parameter controls the maximum number of characters that can be stored by the field. No padding is required for strings shorter than this width. Strings encountered that have length greater than width will still be returned; they will not be truncated. The width parameter is only valuable if the features will be passed to another format that requires this information.

  • x, y, z-coordinate: Coordinate fields store 64-bit floating point values used to create the x, y, and (optionally) z coordinates of a point geometry for the row. The point geometry will be created in addition to the attributes of coordinate types.