Writer Directives

This section describes the keywords the SDE writer module recognizes. Each of the keywords is prefixed by the current <WriterKeyword>_ when they are placed in a mapping file. By default, the <WriterKeyword> for writing vector data is SDE30, the default for writing rastermap data is SDERASTERMAP, and the default for writing raster catalog data is SDERASTERCATALOG.

RECONCILE_AND_POST

Required/Optional: Optional

Note: Valid only for vector features. Not supported for raster tables.

This directive determines which changes to reconcile between the child version (i.e., the version specified by the connection-related directive VERSION_NAME) and its parent version. Conflicts must be resolved manually using Esri ArcGIS. Valid values are INSERTS, UPDATES, DELETES, and ALL. More than one value can be specified as long as each value is separated by a space. A post of the child version to its parent will be automatically performed when ALL is specified, or when INSERTS, UPDATES, and DELETES are all specified. Upon successfully posting the child version to its parent, whether or not the child version is deleted is dependent upon the value of the DELETE_CHILD_AFTER_RECONCILE_AND_POST directive. The directive is also used to determine whether the child version is deleted when it is identical to its parent version, in which case no reconciliation or posting is needed.

The post will be performed automatically when ALL or INSERTS, UPDATES, and DELETES is specified. If an error occurs during the post phase, then all changes made during both the reconcile and post phases will be rolled back.

Value: Any combination of INSERTS, UPDATES, DELETES, and ALL. Each value must be separated by a space.

  • INSERTS – features inserted in the parent version
  • UPDATES – features updated in the parent version
  • DELETES – features deleted in the parent version
  • ALL – encompasses INSERTS, UPDATES, and DELETES.

Example:

In the example below, all the updates and deletes made to the child version will be reconciled with the parent version. If a conflict occurs, then none of the reconciled changes will be saved. If INSERTS was also specified, then a post back to the parent version would also occur, but since neither it nor ALL is specified, only a reconciliation will be performed.

SDE30_RECONCILE_AND_POST UPDATES DELETES

Workbench Parameter: Reconcile and Post

TABLES_TO_RECONCILE

Required/Optional: Optional

Note: Note: Valid only for vector features. Not supported for raster tables.

This optional statement specifies a list of tables (separated by spaces) which should be reconciled. Using this directive, it is possible to use an ArcSDE writer just to reconcile and post changes (i.e., not to write features). It is also possible to specify additional tables to reconcile that were not written to during the current translation. This directive only gets used if the directive RECONCILE_AND_POST is specified. If no tables are specified (and RECONCILE_AND_POST is specified), then only the tables written to during the translation will be reconciled. If no tables were written to during the translation, then no tables will be reconciled.

Value: <[table name]*> separated by spaces. If a table is owned by a different user, then the table name must be prefixed by the owner.

Example:

SDE30_TABLES_TO_RECONCILE countries rivers cities

Workbench Parameter: Tables to Reconcile

DELETE_CHILD_AFTER_RECONCILE_AND_POST

Required/Optional: Required

Note: Valid only for vector features. Not supported for raster tables.

This directive determines whether to delete the child version following a reconcile and post, including the case where the child and parent version are identical. A value of ‘YES’ will delete the child version, while a value of ‘NO’ will leave it intact. The default value is ‘YES’.

Value: YES or NO.

Example:

In the example below, the child version will not be deleted after the reconcile and post operation completes.

SDE30_DELETE_CHILD_AFTER_RECONCILE_AND_POST NO

Workbench Parameter: Delete child state following reconcile and post

TRANSACTION

Required/Optional: Optional

Value: <last successful transaction>

The transaction number of the last successful transaction. When loading data for the first time, set this value to 0.

Example:

SDE30_Transaction 0

Workbench Parameter: Last Successful Transaction

TRANSACTION_INTERVAL

Required/Optional: Optional

Value: <transaction_interval>

Either the number of features in a single transaction, or the value VARIABLE.

Default value: 100

Note: WARNING: If the SDE30_TRANSACTION statement is not specified, then transactions are not used during the data load operation, even if the SDE30_TRANSACTION_INTERVAL is specified.

Example:

SDE30_Transaction_INTERVAL 50

Workbench Parameter: Features Per Transaction

STRICT_LOAD

Required/Optional: Optional

Note: Valid only for vector features. Not supported for raster tables.

This statement instructs FME to be very strict when loading spatial data from a feature into the SDE. When FME encounters a feature whose geometry cannot be converted into an SDE shape allowed by the layer (vector spatial column) for which it is destined, FME terminates the data load, logs the feature, and aborts the current transaction. In comparison to the CONTINUE_TRANSLATION_BAD_DATA directive, STRICT_LOAD is very limited in the type of errors that it can ignore. Use CONTINUE_TRANSLATION_BAD_DATA when it is desirable to ignore the majority of errors that may occur during a data load.

Value: YES | NO

Default Value: NO

Example:

SDE30_STRICT_LOAD YES

Workbench Parameter: Strict SDE Load

FORCE_IN_AGGREGATES

Required/Optional: Optional

Note: Valid only for vector features. Not supported for raster tables.

This statement instructs FME to make an extra effort to store multi-part polygon shapes (aggregates of polygons) into the SDE. When placed in this mode, the FME breaks apart aggregates that, according to the SDE, contain both polygons and lines, and attempts to store them as two feature aggregates. This is designed to assist with the loading of multi-part polygonal data in which some of the polygons are non-compliant with SDE’s definition of a polygon.

To use this mode effectively, you must ensure that any polygonal layer (vector spatial column) for which this is applicable also allows for the storage of multi-part lines.

Value: YES | NO

Default Value: NO

Workbench Parameter: Force In Aggregates

DEFAULT_Z_VALUE

Required/Optional: Optional

Note: Note: Valid only for vector features. Not supported for raster tables.

The value to be used for the z coordinate when a 2D feature is forced to become 3D because the layer (vector spatial column) is defined as being 3D. The z value specified for this directive must be larger than the z origin.

Value: any real number

Default Value: 0

Example:

SDE30_DEFAULT_Z_VALUE 52.3

Workbench Parameter: Default Z Value

LEAVE_LAYER_EXTENTS

Required/Optional: Optional

Note: Note: Valid only for vector features. Not supported for raster tables.

By default, FME updates the layer (vector spatial column) extents when loading data into the SDE. This directive tells the FME not to perform this processing, thereby leaving the layer extent untouched.

Value: YES | NO

Default Value: NO

Example:

SDE30_LEAVE_LAYER_EXTENTS NO

Workbench Parameter: Leave Layer Extents

SPLIT_DONUTS

Required/Optional: Optional

Note: Note: Valid only for vector features. Not supported for raster tables.

This directive is used when donut polygons are not to be stored as donuts, but rather simple polygons. When set to YES donut polygons are not stored in the SDE.

Value: YES | NO

Default Value: NO

Example:

SDE30_SPLIT_DONUTS NO

Workbench Parameter: Store Donuts as Polygons

CONTINUE_TRANSLATION_BAD_DATA

Required/Optional: Optional

Value: YES | NO | ROLLBACK_THEN_CONTINUE

Default Value: NO

Example:

SDE30_CONTINUE_TRANSLATION_BAD_DATA ROLLBACK_THEN_CONTINUE

Workbench Parameter: Skip Bad Data

REJECTED_PIPELINE_DIRECTORY

Required/Optional: Optional

Example:

SDE30_REJECTED_PIPELINE_DIRECTORY c:\sde\pipelines

Workbench Parameter: Rejected Pipeline Folder

WRITER_MODE

Required/Optional: Optional

Note: For more information on this directive, see the chapter Database Writer Mode.

Writing a Raster Map

When writing a raster map to a table in SDE, the writer mode functions in a slightly different manner. INSERT mode inserts the raster into the table, overwriting any data that already pre-existed. UPDATE mode specifies that the writer is to mosaic the raster data to the pre-existing data, thereby updating the single row in the table. Raster catalogs may be inserted to, updated, and deleted from in a similar manner as vector data.

In order to perform a successful update, several conditions must be met by all the raster data that is to be mosaicked: the coordinate systems must be the same, the pixel depth must be the same, and the raster data itself must be either palette colored or continuous (they cannot be mixed). There is also a requirement for cell size and alignment to be the same, but the SDE writer will correct for these automatically, so they need not be altered. There is also no need to alter the writer mode when mosaicking, since the writer will automatically detect and correct this based on whether or not the data is pre-existing, in order not to overwrite it. The only way to overwrite existing raster data in a raster map is to set either the SDE_DROP_TABLE or the SDE_TRUNCATE_TABLE flag to YES.

Value: INSERT | UPDATE | DELETE

Default Value: INSERT

Example:

SDE30_WRITER_MODE INSERT

Workbench Parameter: Writer Mode

BUFFERED_WRITES

Required/Optional: Optional

Value: YES | NO

Default Value: NO

Example:

SDE30_BUFFERED_WRITES YES

Workbench Parameter: Use Buffered Writes

MAX_OPEN_TABLES

Required/Optional: Optional

Value: The maximum number of tables that can be open simultaneously

Example:

SDE30_MAX_OPEN_TABLES 30

Workbench Parameter: Maximum Num of Open Tables

ADD_LAYERS_TO_EXISTING_TABLES

Required/Optional: Optional

Specifies whether and existing business table within ArcSDE should have a layer (vector spatial column) added to it. To be eligible for this schema modification, the first feature written to the table must contain vector geometry.

Value: YES | NO

Default Value: YES

Example:

SDE30_ADD_LAYERS_TO_EXISTING_TABLES NO

Workbench Parameter: Add Layers to Existing Tables

INTEGER_OVERRIDE_DEFINITION

Required/Optional: Optional

Example:

In the example here, the ArcSDE database will use char(30) instead of integer as the type for all integer columns.

SDE30_INTEGER_OVERRIDE_DEFINITION char(30)

Workbench Parameter: Integer Definition