fmeobjects.FMEUniversalWriter
Terminate the writer mid-stream. |
|
|
Provide either a generic FME theme definition or a format specific definition for a theme. |
Close the writer. |
|
Commit the current Transaction. |
|
Get a list of the definition features for the writer. |
|
|
Open the writer. |
Rollback the current Transaction. |
|
Start a new transaction. |
|
|
Write the next feature to the data source. |
- class FMEUniversalWriter
FME Universal Writer Class
init(writerName, cacheFeatures, directives)
Create a FME writer to write data to a format or system. Only the writer’s format identifier, as found in the format index, need be passed in. Any parameters needed for the writer will be passed to it via its ‘open’ call.
- Parameters:
writerName (str) – Writer’s format identifier
directives (dict or list[str]) – Specify one or more additional directives to the writer. All elements in this collection must be
str
. A list should be used if one key is to be set to multiple values. If a list is passed in, key-value pairs such as those in a dict must be placed side by side. For example, the key should be placed in the first list element, followed by the value for the key. All the directives applicable to the reader are allowed for the writer. However, the writer will ignore the IDLIST directive. It also interprets the user pipeline directive in a slightly different way – for the writer, features are sent through the user pipeline BEFORE being sent to the output writer.
- __init__(*args, **kwargs)
- abort()
Terminate the writer mid-stream.
- Return type:
None
- Raises:
FMEException – An FMEException is raised if there was an error.
- addSchema(feature)
Provide either a generic FME theme definition or a format specific definition for a theme.
- Parameters:
feature (FMEFeature) – The feature containing the theme definition.
- Return type:
None
- Raises:
FMEException – An FMEException is raised if there was an error.
- close()
Close the writer.
- Return type:
None
- Raises:
FMEException – An FMEException is raised if there was an error.
- commitTransaction()
Commit the current Transaction. For formats or systems which do not have the notion of a Transaction, nothing is done.
- Return type:
None
- Raises:
FMEException – An FMEException is raised if there was an error.
- getSchemaFeatures()
Get a list of the definition features for the writer. This enables applications to determine exactly what the definition features look like in the destination system.
- Return type:
- Raises:
FMEException – An FMEException is raised if there was an error.
- open(datasetName, parameters)
Open the writer.
- Parameters:
- Return type:
None
- Raises:
FMEException – An FMEException is raised if there was an error.
- rollbackTransaction()
Rollback the current Transaction. For formats or systems which do not have the notion of a Transaction, nothing is done.
- Return type:
None
- Raises:
FMEException – An FMEException is raised if there was an error.
- startTransaction()
Start a new transaction. For formats or systems which do not have the notion of a Transaction, nothing is done.
- Return type:
None
- Raises:
FMEException – An FMEException is raised if there was an error.
- write(feature)
Write the next feature to the data source.
- Parameters:
feature (FMEFeature) – The next feature to write.
- Return type:
None
- Raises:
FMEException – An FMEException is raised if there was an error.