See Database Schema Best Practices: Composite Keys for more information on how to work with tables with composite keys. Appian recommends that you choose only one column as the primary key. You will have the opportunity to remove additional primary keys or select another column as the primary key. If the database table contains multiple primary keys, your data store will not publish and you cannot connect to the table.If the key is not unique, queries may return inconsistent responses, and any Excel or CSV exports of the data may be incomplete. Appian uses the primary key to query the data store. If the CDT is based on a view, you must use a unique field for the primary key.If the database table does not contain a primary key or you create a CDT based on a view, you will have the option to set the primary key by clicking on the key icon for that field.If the database table contains a single primary key, that will be automatically set on your CDT.Additionally, your data type must have an explicit primary key field in order to be used as the source for a record type.Ĭreating a CDT based on a database table or view handles primary keys in the following ways: We do not recommend allowing Appian to generate the primary key column because it cannot be queried or referenced by processes, so it is impossible to update any existing value in the database table. Without a primary key, the data store will fail to publish and Appian will offer to generate one for you. Primary keysĪll data types that map to a database table or view must have a primary key defined. See the field types section for a list of supported column types and how they map to Appian types. If your CDT does not contain a field for each of your columns, it may be because the database column type is not supported. For example, all text-based columns default to Text, but can be changed to Encrypted Text because that type also maps to text columns. When the column type has multiple valid options, we allow you to change the type. The type of each field is determined based on the column type. The new CDT is not created until you click the Create button. You can change the field name and type (in some circumstances), reorder fields, and remove any unnecessary fields. You now have the opportunity to modify your CDT before you create it. A field is created for each column and has a default name and type. Additionally, you may create CDTs based on the table or view that the synonym points to by selecting the schema in which those tables or views live from the Schema dropdown.Īppian reads the information from the table or view and populates the CDT name and fields with default values. You may still map CDTs to synonyms, but CDTs cannot be created automatically based on a synonym. If your database schema contains synonyms that expose tables or views from a different schema, those are not currently available in the Table or View dropdown.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |