Skip to main content
February 25, 2024
Question

In CDT How to handle the table without having primary key?

  • February 25, 2024
  • 7 replies
  • 0 views

If a database table do not have any primary key, then how we can handle this table in Appian CDT?

    7 replies

    stefanhelzle0001
    Brainy
    February 25, 2024

    Not. Appian requires a primary key. If you do not have one, you could create a view that adds an artificial PK.

    February 25, 2024

    How can we update the data in that table if we are creating the view?

    mathieud0001
    Brainy
    February 25, 2024

    If you are creating a view, simply add a new column for the artificial or composite key.

    CREATE VIEW my_view AS
    SELECT col1, col2, CONCAT(col1, '_', col2) AS composite_key
    FROM my_table;

    davidj137213
    Brainy
    February 26, 2024

    Why do you have one table without a primary key? Add it with autoincrement at least , and you will we able to create your cdt.

    mikes0011
    Brainy
    February 26, 2024
    then how we can handle this table in Appian

    By updating it to add a Primary Key column.

    The Expression Guru