SpatiaLite Writer Parameters
About Database Connections |
---|
Database formats include a Database Connection parameter that defines and stores authentication information. For general information about sharing database connections, please see Note that Database Connection parameters differ slightly, depending on context and/or database format. |
Connection From the Connection parameter in a database format, you can do one of the following: Select an existing, previously defined connection. See the section Reusing a Database Connection in Using Database Connections Select Add Database Connection to define a new connection. See database-specific parameters below, as well as the section Adding a Database Connection in a Workspace in Using Database Connections The new connection can be made visible only to the current user, or can be shared among multiple users. |
Database Connection
The path to the SpatiaLite database.
- When unchecked (default) and a database already exists, then tables and features are written to the existing database.
- When checked, any existing database is deleted before writing begins. Checking this option also enables the Template File parameter.
If a database does not exist when writing begins, a new database is created.
This parameter is enabled when the Overwrite Existing Database option is checked.
When a template file is specified, the destination file is replaced with a copy of the template before writing begins.
Spatial
Specifies the name of the spatial column to write to.
This parameter is optional and defaults to empty, which means a default name of “geom” will be used. When writing to an existing table with multiple geometry columns, the spatial column name will be used to determine which column to write to.
Specifies a spatial reference identifier to use when adding a geometry column to a newly-created table.
This parameter is optional and defaults to empty. If this option is empty, the writer coordinate system will be used to try and determine a valid SRID. If the writer coordinate system is also empty, the coordinate system of the first feature will be used. If a valid SRID cannot be determined from any of these sources, an unknown value of 0 will be used.
Specifies a dimension to use when adding a geometry column to a newly-created table:
- Dimension from First Feature (default) – Files produced will contain geometries with dimension information obtained by the first feature observed by the writer.
- XY – Files produced will contain 2D coordinate geometry.
- XYZ – Files produced will contain 3D coordinate geometry.
- XYM – Files produced will contain 2D (x,y) coordinates, as well as an m (measured value) dimension. m is an extra axis of information not associated with the Cartesian x/y/z space.
- XYZM – Files produced will contain 3D (x,y,z) coordinate geometry and measures.
Determines whether or not lines and polygons will be written SpatiaLite’s compressed geometry format. Selecting Yes will reduce file size.
Default: No
- Yes (default) – Creates a spatial index for the tables produced by the writer. A spatial index can be used to perform faster geometry-related queries.
Advanced
Specifies which SQL operations will be performed by default by this writer.
Supported modes are Insert, Update, Delete, and Upsert.
For detailed information on feature operations, see Feature Operation.
The number of features that FME places in each transaction before a transaction is committed to the database.
The default value is 500.
This parameter allows for the execution of SQL statements before writing to a table. For example, it may be necessary to clean up a table before attempting to write to it. The statements will be executed only when the first feature arrives at the writer.
For detailed information about SQL functions, click the corresponding menu item in the
.Available menu options depend on the format.
Multiple SQL commands can be delimited by a character specified using the FME_SQL_DELIMITER
directive, embedded at the beginning of the SQL block. The single character following this directive will be used to split the SQL block into SQL statements, which will then be sent to the database for execution. Note: Include a space before the character.
For example:
FME_SQL_DELIMITER ; DELETE FROM instructors ; DELETE FROM people WHERE LastName='Doe' AND FirstName='John'
Multiple delimiters are not allowed and the delimiter character will be stripped before being sent to the database.
Any errors occurring during the execution of these SQL statements will normally terminate the reader or writer (depending on where the SQL statement is executed) with an error. If the specified statement is preceded by a hyphen (“-”), such errors are ignored.
This parameter allows for the execution of SQL statements after a set of tables has been written. For example, it may be necessary to clean up a temporary view after creating it.
For detailed information about SQL functions, click the corresponding menu item in the
.Available menu options depend on the format.
Multiple SQL commands can be delimited by a character specified using the FME_SQL_DELIMITER
directive, embedded at the beginning of the SQL block. The single character following this directive will be used to split the SQL block into SQL statements, which will then be sent to the database for execution. Note: Include a space before the character.
For example:
FME_SQL_DELIMITER ; DELETE FROM instructors ; DELETE FROM people WHERE LastName='Doe' AND FirstName='John'
Multiple delimiters are not allowed and the delimiter character will be stripped before being sent to the database.
Any errors occurring during the execution of these SQL statements will normally terminate the reader or writer (depending on where the SQL statement is executed) with an error. If the specified statement is preceded by a hyphen (“-”), such errors are ignored.