There are total 15 tables that i need to access in the db for the record dashboa

There are total 15 tables that i need to access in the db for the record dashboard. So i have created a view in database connecting those 15 tables. Now when i created an xsd/CDT in appian and trying to save&publish in the datastore, it is throwing an error that, the view cannot be altered at db as it is a view not a table.
Can anybody let me know, how to link a CDT with database View ?

OriginalPostID-149526

OriginalPostID-149526

  Discussion posts and replies are publicly visible

Parents
  • Also as you may not have a key unique across 15 tables, you can add a unique 'Row' column to your view and utilize that in the CDT as such below. I've also found this needs to be defined in the CDT as 'bigint', instead of int.

    <xsd:element name="Row" nillable="true" type="xsd:int">
    <xsd:annotation>
    <xsd:appinfo source="appian.jpa">
    @Id
    @Column(columnDefinition="bigint NOT NULL")
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>

    In MSSQL:

    SELECT TOP (100) PERCENT ROW_NUMBER() OVER (ORDER BY aColumnInYourTableHere) AS Row,
Reply
  • Also as you may not have a key unique across 15 tables, you can add a unique 'Row' column to your view and utilize that in the CDT as such below. I've also found this needs to be defined in the CDT as 'bigint', instead of int.

    <xsd:element name="Row" nillable="true" type="xsd:int">
    <xsd:annotation>
    <xsd:appinfo source="appian.jpa">
    @Id
    @Column(columnDefinition="bigint NOT NULL")
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>

    In MSSQL:

    SELECT TOP (100) PERCENT ROW_NUMBER() OVER (ORDER BY aColumnInYourTableHere) AS Row,
Children
No Data