Writer Directives
The directives that are processed by the Ingres Spatial writer are listed below. The suffixes shown are prefixed by the current <WriterKeyword>
_ in a mapping file. By default, the <WriterKeyword>
for the Ingres Spatial writer is COM.ACTIAN.INGRES.INGRES
.
DATASET/DATABASE, HOST, PORT, USER_NAME, PASSWORD
These directives operate in the same manner as they do for the Ingres Spatial reader.
DEF
Each Ingres table must be defined before it can be written. The general form of an Ingres definition statement is:
INGRES_DEF <tableName> \ Ingres_type <Ingres_type> \ [Ingres_mode (insert|update|delete|inherit_from_writer)] \ [Ingres_spatial_column <column>] \ [Ingres_drop_table (yes|no)] \ [Ingres_truncate_table (yes|no)] \ [Ingres_create_with_oids (yes|no] \ [Ingres_create_with_gist_index (yes|no)] \ [Ingres_vacuum_analyze (yes|no)] \ [<fieldName> <fieldType>][,<indexType>]*
The table definition allows control of the table that will be created. If the table already exists, the majority of the ingres_ parameters
will be ignored and need not be given. If the fields and types are listed, they must match those in the database.
If the table does not exist, then the field names and types are used to first create the table. In any case, if a <fieldType>
is given, it may be any field type supported by the target database.
Required/Optional
Required
Configuration Parameters
The configuration parameters present on the definition line are described in the following table:
Parameter |
Contents |
tableName |
The name of the table to be written. If a table with the specified name exists, it will be overwritten if either the |
ingres_type |
The type of geometric entity to which the created table will be constrained. The valid values for the type are listed below: ingres_point ingres_multipoint ingres_linestring ingres_multilinestring ingres_polygon ingres_multipolygon ingres_geometrycollection ingres_none ingres_geometry (allow anything) If a collection is written to a table constrained to single pieces of geometry, the collection will automatically be broken apart for writing. Conversely, if a single piece of geometry is written to a table constrained to one of the collection types, it will automatically be wrapped in a collection. |
ingres_mode |
The default operation mode of the feature type in terms of the types of SQL statements sent to the database. Valid values are Default: |
ingres_spatial_column |
This specifies the name of the column to be created that will hold the spatial data when creating a new Ingres table. Default: shape |
ingres_drop_table | This specifies that if the table exists by this name, it should be dropped and recreated before any features are written to it. |
ingres_truncate_ table | This specifies that if the table exists by this name, it should be truncated before any features are written to it. |
ingres_create_with_oids |
Create the table including a system OID column as a unique identifier. If set to no, then the OID column is not created. Default: yes |
ingres_create_rtree_index |
Create an RTREE index on the geometry column of the table (as long as one exists).The indexing of the geometry column is required for spatial query performance. Default: yes |
ingres_table_page_size |
Use this option to select the page size of a table created with FME. Default: 8192 |
ingres_inline_size |
If Ingres 10.2 or newer you can use this option to set how much of a LOB or Geometry to inline instead of storing it in an extension table. Default: 2048 Valid range: 0-32000 |
ingres_data_compression |
Configure new table created with FME to use data compression. Default: yes |
fieldName |
The name of the field to be written. Valid values for field name include any character string devoid of SQL-offensive characters and less than 256 characters in length. |
fieldType |
The type of a column in a table. The valid values for the field type are listed below: bool char(width) nchar(width) varchar(width) nvarchar(width) longvarchar longnvarchar int2 int4 int8 byte(width) varbyte(width) longbyte identity float4 float8 money number(width,decimal) date time timetz timestamp timestamptz |
indexType |
The type of index to create on the given field. The valid values for the index type are listed below: BTREE (default attribute index) RTREE HASH ISAM |
START_TRANSACTION
This statement tells the Ingres Spatial writer module when to start actually writing features into the database.
The Ingres Spatial writer does not write any features until the feature number of features are skipped, and then it begins writing the following features. Normally, the value specified is zero – a non-zero value is only specified when a data load operation is being resumed after failing partway through.
Required/Optional
Optional
Mapping File Syntax
INGRES_OUT_START_TRANSACTION 0
Workbench Parameter
Starting Feature
TRANSACTION_INTERVAL
This directive determines the number of features that FME will place in each transaction before a transaction is committed to the database.
If the INGRES_TRANSACTION_INTERVAL statement is not specified, then a value of 1000 is used as the transaction interval.
Required/Optional
Optional
Mapping File Syntax
INGRES_OUT_TRANSACTION_INTERVAL 2000
Workbench Parameter: Features Per Transaction
BATCH_INSERTS
This statement tells the Ingres Spatial writer module to insert data into the database using batched inserts which bulks inserts together before sending them to the server. The batch is sent when a commit is issued. A commit is issued every INGRES_TRANSACTION_INTERVAL features.
Required/Optional
Optional
Mapping File Syntax
INGRES_BATCH_INSERTS YES
Workbench Parameter
Batch Inserts
WRITER_MODE
This directive informs the Ingres Spatial writer which SQL operations will be performed by default by this writer.
This operation can be set to INSERT
, UPDATE, or DELETE
. The default writer-level value for this operation can be overwritten at the feature type or table level.
The corresponding feature type DEF
parameter name is called INGRES_MODE
. It has the same valid options as the writer-level mode, as well as the value INHERIT_FROM_WRITER
(which causes the writer-level mode to be inherited by the feature type as the default for features contained in that table).
The operation can also be set specifically for individual features, using the fme_db_operation attribute.
Note: Note that when the writer mode is set to INSERT
, this prevents the mode from being interpreted from individual features and all features are inserted unless otherwise marked as update or delete features. These are skipped.
Required/Optional
Optional
Mapping File Syntax
INGRES_WRITER_MODE INSERT
If this directive is not specified, then a value of INSERT
is given.
Workbench Parameter
Writer Mode
Note: For more information on this directive, see the Database Writer Mode.
GENERIC_GEOMETRY
This directive applies at generation time, not at translation time.
The default value of NO indicates that we want the previous behavior of creating geometrically constrained spatial columns on the destination tables. For example, a POINT spatial table would be restricted only to points.
Now we have the option to create generic or non-geometrically constrained spatial columns. This means you can insert multiple geometry types into one table. Specifically the spatial column is created to have the generic type GEOMETRY
and there are no constraints placed on the geometry types allowed.
Required/Optional
Optional
If the INGRES_GENERIC_GEOMETRY
statement is not specified, then a value of NO is given.
Mapping File Syntax
INGRES_GENERIC_GEOMETRY YES
SPATIAL_COLUMN_NAME
The default value of shape indicates that we want to create a spatial column with the name “shape” on the destination tables by default. This value can also be set specifically for individual feature types.
Note: This directive only applies at generation time (not during translation).