Writer Directives

The suffixes shown are prefixed by the current <WriterKeyword> in a mapping file. By default, the <WriterKeyword> for the writer is FMESERVERREPOSITORY.

DATASET

This specifies the machine running an FME Server instance to read from as either an IP address or host name. The FME Server must have proper permissions and be set up correctly to accept connections from a remote machine.

Required/Optional

Required

Mapping File Syntax

DATASET myfmeserver 

Workbench Parameter

Destination FME Server Repository Host

DEF

Required/Optional

Required

Mapping File Syntax

The syntax of the definition is:

FMESERVEREPOSITORY_DEF <repository name> \
 repository_name varchar(255) \
 repository_description buffer \
 repository_item_id int32 \
 repository_item_name varchar(255) \
 repository_item_path buffer \
 [repository_item_resource_name{} varchar(255) \] + 
 [repository_item_resource_path{} buffer \] +
 [repository_item_property_key{} varchar(255) \] +
 [repository_item_property_value{} buffer \] +
 [repository_item_property_key{}.attribute_key{} varchar(255) \] +
 [repository_item_property_key{}.attribute_value{} buffer] +

OR

FMESERVEREPOSITORY FMESERVERSERICES \
 repository_service_id int32 \
 repository_service_name varchar(255) \
 repository_service_displayname varchar(255) \
 repository_service_urlpattern buffer \
 repository_service_description buffer \
 [repository_service_workspace{} buffer \] +
 [repository_ service_category_name{} varchar(255) \] +
 [repository_service_category_name{}.property_key{} varchar(255) \] +
 [repository_service_category_name{}._property_value{} buffer \] +
 [repository_service_category_name{}._property_key{}.attribute_key{} varchar(255) \] +
 [repository_service_category_name{}._property_key{}.attribute_value{} buffer] +

The <repository name> must match the name of an existing repository in the FME Server. This will be used as the feature type of all the repository items read from the repository.

The <attrType> of each field must be given, but it is not verified against the database definition for the field. In effect, it is ignored.

The following table shows the attribute types supported.

Field Type

Description

varchar(<width>)

Character fields store variable 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.

buffer(<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.

number(<width>,<decimals>)

Number fields store single and double precision floating point values. The width parameter is the total number of characters allocated to the field, including the decimal point. The decimals parameter controls the precision of the data and is the number of digits to the right of the decimal.

The following example shows a basic repository feature type.

FMESERVEREPOSITORY _DEF MYREP \
 repository_name varchar(255) \
 repository_description buffer \
 repository_item_id int32 \
 repository_item_name varchar(255) \
 repository_item_path buffer

REPOSITORY_PORT

When connecting remotely, this directive specifies the TCP/IP port through which to connect to the FME Server.

The default port is 7071.

Required/Optional

Required

Mapping File Syntax

REPOSITORY _PORT 7071

Workbench Parameter

Port

REPOSITORY_USERNAME

This directive contains the name of user who will access the FME Server. The named user must exist with appropriate permissions.

The default user name is admin.

Required/Optional

Required

Mapping File Syntax

REPOSITORY _USERNAME admin

Workbench Parameter

Username

REPOSITORY_PASSWORD

This directive contains the password of the user accessing the database.

Required/Optional

Required

Mapping File Syntax

REPOSITORY _USERNAME password

Workbench Parameter

Password

REPOSITORY_WRITEROPTION

This directive defines what action will be taken when a service, repository, item or resource already exists.

Required/Optional

Required

Values

  • Append: If a repository already exists, it will try to add only the new items. If an item or resource already exists, it will be skipped. This is the default value.
  • Merge: If a repository already exists, it will add new items and update those that already exist. It will also update a resource if it already exists.
  • Drop: If a repository already exists, it will be dropped. Then it will add the new items and resources.

Mapping File Syntax

REPOSITORY _WRITEROPTION APPEND

Workbench Parameter

Writer Behavior