Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
6 replies
Subscribers
10 subscribers
Views
2717 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Data and Records
There are total 15 tables that i need to access in the db for the record dashboa
saratrk
over 9 years ago
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
0
Chris
over 9 years ago
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,
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Chris
over 9 years ago
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,
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data