Creating Tables Without Data Features
Always Create Tables
After running a translation, there can be some scenarios when an expected table was not created because no data features reached the writer.
The Always Create Tables parameter allows writers to create tables when no data features arrive, or if the writer is not connected to anything. This parameter is disabled (set to No) by default, but can be enabled (set to Yes) under the Advanced parameters for supported formats.
The creation of tables without data features relies on the writer's ability to determine how a table should look with the available information. If the available information is insufficient, the table will not be created.
Table Handling
The table handling option is honored when creating tables without data features.
Examples:
- If the writer feature type parameter Table Handling is set to Drop and Create, the writer will drop the table and recreate it.
- If the writer feature type parameter Table Handling is set to Write if Empty, the writer will load features to table only if the table is empty, or does not exist.
Static Feature Types
Static Feature Types means that the feature type and its attributes are defined prior to running the translation.
There are two cases where a table can be created using Always Create Tables:
- The writer is connected to an incoming data pipe, and Attribute Definition (User Attributes tab) is set to either Automatic or Manual.
- The writer is not connected to any incoming data pipe, and Attribute Definition (User Attributes tab) is set to Manual.
In these two cases, the tables will be created at the end of a translation if no data features arrive at the writer/destination feature type.
Dynamic Feature Types
Dynamic Feature Types means that the feature type name and its attributes are determined during the translation.
In this case, tables will only be created without data features if the Schema Source is Schema From Schema Feature.
At the end of a translation, any schema features which were not used for any data features will have a table created using the value of fme_feature_type_name from the schema feature. Note that schema features can be used for tables that have a different name.
Geometry
On formats where the geometry type of a table can be selected, the geometry type can be inferred from the schema feature. However, if the type cannot be determined unambiguously, then the table will not be created.
This is done by setting the Geometry type to From Schema Definition.