Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Suggested Answer
Replies
4 replies
Answers
1 answer
Subscribers
9 subscribers
Views
3609 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Strategy for handling oracle tables with number PK values > 2.2 billion
marky
over 8 years ago
Hello All:
We are using oracle, and struggling to future proof our application to handle a large number of rows and PK values for certain tables/views.
The sequence to insert values apparently only works with number data types, which puts the limit of 2^32-1 for values that Appian can handle.
Casting the PK to VARCHAR and in Appian, Text is causing a failure to insert for the CDT/Data Store.
Is there any strategy we can use to allow PK numbers > 2.2 billion?
OriginalPostID-273724
Discussion posts and replies are publicly visible
0
Stefan Helzle
A Score Level 3
over 8 years ago
Did you try to map the data types in the XSD file? We work with number(38,0) in Oracle and map it to string in Appian.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
marky
over 8 years ago
Can you give an example of how you did the xsd mapping for a full CDT? When I create a CDT with a single field, the PK of the view which is NUMBER data type mapped to Appian Text type, the Data Store successfully verifies, and query works as you have stated. But as soon as I add another field to the CDT, I get the error for the previously working element: The data source schema does not match the type mappings: Wrong column type in [] for column []. Found: number, expected: varchar2(255 char). Thanks
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 8 years ago
Sure. You download the XSD, modify it and upload it again. Check
docs.appian.com/.../Mapping_CDTs_to_Pre-defined_Database_Tables.html
<xsd:element name="billionId" nillable="true" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="appian.jpa">@Id @Column(name="BILLIONID", columnDefinition="NUMBER(38)")</xsd:appinfo>
</xsd:annotation>
</xsd:element>
This will not have any impact on other fields or cause issues when you add any new fields.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aloks0189
Certified Lead Developer
over 8 years ago
marky
i agree with
Stefan Helzle
, you can try creating the Primary Key as String in DB Table and map the same using the CDT as Primary Key and uncheck AutoGenerate checkbox in CDT, now while inserting record into DB, get the totalCount of that table and use tostring(totalCount+1) as the Value for Primary Key, this can do your Job.
Now to get the totalCount, i would suggest you better go for the Smart Service instead of using QueryRule or QueryEntity, and you can execute the following Query: select count(*) from TableName; this will give you the totalCount for the mention table.
But i would like to know one thing, will you really be inserting this much huge data into a DB table because for processing this much of huge Data, normally we need to for BigData, Hadoop.
However this should work for you requirement
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Reject Answer
Cancel