Writer Feature Type Properties: User Attributes
This section of the SDE30_DEF
statement defines the attributes for a table. A table must have at least one attribute.
- The
<attribute name>
specified within the FME mapping file must obey the following rules:- Attribute Names must be in uppercase.
- Attribute Names must obey all length and character restrictions of the SDE.
-
The
<attribute definition>
defines the type and optionally the attribute, and has the following form:<attribute type>,(optional|required)
- The supported attribute types are listed in the following table.
FME Attribute Type |
smallint |
integer |
float |
double |
char(n) |
clob |
blob |
date |
guid |
The directive optional
or required
immediately follows the attribute type and indicates if the attribute is required. If nothing is specified, then the value defaults to optional.
The following example creates a required attribute called NUMOFLANES
which is an integer
type.
NUMOFLANES integer,required
smallint
This type is used to represent 16-bit integer values.
integer
This type is used to represent 32-bit integer values.
float
This type is used to represent 32-bit float values.
double
This type is used to represent 64-bit integer values.
char(n)
This type is used to represent character values with a length not exceeding n
characters.
If char(n) is larger than the maximum size of a char column for the underlying RDBMS and the RDBMS supports clobs, clobs will be used instead. See the Esri documentation for your RDBMS for the specific sizes where clobs are used.
The char(n) column maps to a Unicode column encoded in UTF-16 if the DBTUNE parameter UNICODE_STRING is set to TRUE or is not present.
clob
This type is used to represent character values with a very large length. ArcSDE does not support this type for all RDBMS. In databases where this is not supported, char(n) will be used instead, where n is a large number .
The clob column maps to a Unicode column encoded in UTF-16 if the DBTUNE parameter UNICODE_STRING is set to TRUE or is not present.
blob
This is used to store arbitrary binary data in the SDE. See @Reformat and @File in the FME Functions, Factories and Transformers manual for a description of the @Reformat and @File functions, and for information on how to load and retrieve data into a blob attribute.
With the use of blob types coupled with @System and @File it is possible to store any arbitrary data with an SDE feature. If a feature has sound, video, images, or documents, or all of the above, they can be zipped up to form a compact package using @System. Next, @File can be used to load the zip file into an attribute of the SDE. The contents are then loaded directly in the database for later retrieval.
date
This is used to store and retrieve date information to the SDE.
When a date field is read by the SDE, two attributes are set in the FME feature. The first attribute has the name of the database column, and its value is of the form YYYYMMDD
. This is compatible with all other FME dates.
The second attribute has a suffix of .full
and is of the form YYYYMMDDHHMMSS
. It specifies the date and the time, with the time portion specified using the 24-hour clock.
For example, if a date field called UPDATE_DATE
is read, the following attributes will be set in the retrieved FME feature:
UPDATE_DATE =’19980820’
UPDATE_DATE.full=’19980820201543’
When writing to the SDE, the writer looks for both attributes. Either may be in the form YYYYMMDD
or YYYYMMDDHHMMSS
. If both attributes are specified, then the value specified in UPDATE_DATE.full
is used.
guid
This type is used to represent Globally Unique Identifiers (GUIDs), which are stored as text strings of length 36 within FME. The format of a GUID is 8 hexadecimal digits followed by a hyphen, then three groups of 4 hexadecimal digits, each followed by a hyphen, and then 12 hexadecimal digits. Note that { and } braces found at the beginning and end of the GUID are removed by the Reader and added on by the Writer if not present.
When writing to a required GUID field, the Writer will automatically generate a GUID if no value is supplied for it on the feature.
Example:
414EF035-DCDF-4DAD-96DA-E86C0DA661B2