Downloads

Introduction

Aliases are alternative names given to fields
in a dataset that are often more descriptive than the actual field name. Most users of FME who work with a Geodatabase will want to
be able to create or maintain field aliases within their datasets. When adding a File Geodatabase to a workspace, alias control
can be found under Schema Attributes > Alias Mode.

Alias Mode controls how Geodatabase aliases are used.

None: Aliases are ignored.

Replace Attribute Names with Aliases: Attributes on feature types will be named based on their aliases
rather than their official names. A geodb_feature_class_alias attribute will be
included on each feature. Use this mode when the target format should create
feature types using aliases as attribute names.

Expose Aliases as
Metadata Attributes: For each attribute read, a second <name>_alias
attribute will be added that stores the alias for the attribute in question. A
geodb_feature_class_alias attribute will also be included on each feature. Use
this mode when the target format is Geodatabase and the aliases should be
preserved during feature class and table creation.

Source Data

Community Centres (ESRI File Geodatabase Feature Class)

In the above image, we see a visualization of the Community Centres feature class and its accompanying attributes containing values for Name,
Address and Website URL of the various community centres located in the city of Vancouver. By examining the properties of this feature class, one can see
that field aliases are present in the data.

Workspace Description

1. Read Source Data - (ESRI Geodatabase - File Geodb)

Community Centre feature geometry and attributes are read from the Geodatabase feature class source
file using the ESRI Geodatabase
(File Geodb) reader, providing the features, attributes, and alias definitions for the destination Geodatabase feature class. When adding the source feature class data, click on the reader parameters button in order to select the Community Centre
table from the Table List parameter and set Alias Mode to the "Expose Aliases as Metadata Attributes" option.

By exposing the aliases as metadata, a <name>_alias
attribute will be added to the incoming data. This attribute will be used to store the alias value for the corresponding attribute.

2. Alter Alias Values

The AttributeManager is used to access the <name>_alias attributes exposed in Step 1 and assign the Geodatabase attribute aliases new values. In the AttributeManager properties, simply type in the <name>_alias attributes you wish to change under Output Attribute and set the Attribute Value to contain the altered value you wish to write to the destination alias definition.

It is of note that this step could alternatively be accomplished using the AttributeCreator.

3. Write Alias Values to Destination Geodatabase

Add the ESRI Geodatabase (File Geodb) writer and specify the output Geodatabase to which the data will be written (i.e. VancouverCity). Once added, connect the output of the AttributeManager to the Geodatabase writer. As an optional step, if you wish to write the Community Centres data to a feature dataset, double-click on the Geodatabase writer and, under Format Parameters, type "Community" in the Feature Dataset area. Save and run the workspace.

Advanced

FME is able to create attribute aliases for features read into the workspace that do not have aliases. This is possible if there is an additional attribute with the same name as the original attribute and is suffixed with "_alias". The value of that attribute will be used as the alias on table creation.

For example: there is an attribute named CentreAddress and there is another attribute named CentreAddress_alias with a value of Address. The value of CentreAddresss_alias will be used as the alias of CentreAddress (alias: Address). This only needs to occur on the first feature.

I guess if my translation does not include reading a file geodatabase this will not work... So if I use a featurewriter to create the feature class, then connect that to a featurereader to Expose Aliases as Metadata, then I can finish this with attirbutemanager to change the aliases and then a writer at the end. Any comments on this workflow?

Will this work using the same feature class/ feature type on the reader and writer?

I've done some testingquestion #1 - will not work because the featurereader parameter for a file geodatabase does not include the Advanced Schema attribute parameter which will expose Aliases as Metadata.question #2 - Using Update on the Writer mode, the aliases were not changed. Using the same FGDB but different feature type/FC, it worked.

I think your workflow should be successful. In my testing the FeatureReader does have the Alias Mode options that are necessary to complete this task. I'm using FME 2016.1.1. See an image here: FeatureReader

In regards to question #2, I think you would need to drop the table in order for this to work as an update will not change the alias information stored on the table.

I hope that helps, feel free to file a support ticket on this matter to explore this further.