I created a view in SQL to calculate the age of a person. MariaDB is formating the age field as a bigint(21). I am connecting an CDT to this view and I need to know what the columnDefinition would be for a big integer. I tried INT and BIGINT and that doesn't work.
<xsd:element name="age" nillable="true" type="xsd:int"> <xsd:annotation> <xsd:appinfo source="appian.jpa">@Column(name="Age", columnDefinition="INT")</xsd:appinfo> </xsd:annotation> </xsd:element>
I even tried to cast the calculated field as an integer in the SQL statement, but that did not work either?
CAST(TIMESTAMPDIFF(YEAR, `CM`.`ClergyDOB`, CASE WHEN `CM`.`ClergyDOD` IS NULL THEN CURDATE() ELSE `CM`.`ClergyDOD` END ) AS INT) AS `Age`,
Discussion posts and replies are publicly visible
did you try LONG yet?
Try Number(Decimal)
Mapping Custom Data Types (CDTs) to Pre-defined Database Tables - Appian 24.3
So I just deleted the CDT and from the Data Store and recreated the table from the SQL view. Evidently, BIGINT seems to work except for me it didn't.
<xsd:element name="age" nillable="true" type="xsd:int"> <xsd:annotation> <xsd:appinfo source="appian.jpa">@Column(name="Age", columnDefinition="BIGINT")</xsd:appinfo> </xsd:annotation> </xsd:element>