I am using a sequence in oracle to increment the value but the created table does not have this ID set to primary key.
How do I get a table I am creating to set a column to be the primary key?
(Im in FME 2013)
I am using a sequence in oracle to increment the value but the created table does not have this ID set to primary key.
How do I get a table I am creating to set a column to be the primary key?
(Im in FME 2013)
If the table will be newly created by the writer, you can add the primary key constraint with setting a SQL statement to the "SQL Statment To Execute After Translation" parameter of the writer. The parameter is shown as the a writer parameter (Advanced) in the Navigator window. The syntax may be:
-----
ALTER TABLE <table name> ADD ACONSTRAINT <key name>] PRIMARY KEY (<column names, comma seperated if multiple columns to be set>);
-----
Not tested. See also the Oracle documentation about the correct syntax.
In FME 2014 or later, primary key column(s) can be specified in the writer feature type properties dialog (User Attributes tab).
Takashi