Strategy for handling oracle tables with number PK values > 2.2 billion

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

Parents
  • 0
    Certified Lead Developer
    i agree with , 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
Reply
  • 0
    Certified Lead Developer
    i agree with , 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
Children
No Data