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
27 replies
Subscribers
8 subscribers
Views
12583 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
How to Define "BLOB" dataType of SQL in Appian CDT
mohammedz
Certified Associate Developer
over 8 years ago
Guyz,
I have a table in database with three columns
ID - Number
Document - BLOB
Name - VARCHAR
The Document column is of "BLOB" DataType....
Now I need to create a CDT and Map it to the Table
To do so what should be the dataType in my CDT or XSD Definition
Appreciate ur response....!!!!
OriginalPostID-232170
Discussion posts and replies are publicly visible
Top Replies
ankitb0003
over 8 years ago
+1
I have used the following definition for CLOB, It worked for me. it should be same for BLOB. <xsd:element name="DOCUMENT" nillable="true" type="xsd:string"> <xsd:annotation> <xsd:appinfo source="appian…
0
mohammedz
Certified Associate Developer
over 8 years ago
------
When tried publishing dataStore automatically from Appian I am getting the below error
The data source schema does not match the type mappings: Wrong column type in BPMBUSINESS.CABCBLOBTESTZUBAIR for column DOCBLOB. Found: blob, expected: varchar2(255 char) (APNX-2-4056-000)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
TJ
A Score Level 2
over 8 years ago
Blob is not available as CDT parameter. Instead, you can create a stored procedure.
Create a java plugin to call a stored procedure, convert your Appian data to BLOB using java and store it in databse.
Hope it helps
Cancel
Vote Up
-1
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mohammedz
Certified Associate Developer
over 8 years ago
Is there could be any other approach ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ankitb0003
over 8 years ago
I have used the following definition for CLOB, It worked for me. it should be same for BLOB.
<xsd:element name="DOCUMENT" nillable="true" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="appian.jpa">@Column(name="DOCUMENT", columnDefinition="CLOB")</xsd:appinfo>
</xsd:annotation>
</xsd:element>
Cancel
Vote Up
+1
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 8 years ago
To store documents in DB there is some plugins available.
forum.appian.com/.../blob
You will have to check compatibility of these plugins as they are for 7.10. To access the data from Appian you can just skip the document field as the plugin uses SQL queries to read and write data.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mohammedz
Certified Associate Developer
over 8 years ago
Great Ankit .... Same annotation worked for BLOB as well
Appreciate ur help ..!! Thanks
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mohammedz
Certified Associate Developer
over 8 years ago
@stefan791
I am using the same what you mentioned.But I have a issue
How to pass the SQL Query to the smart Service
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 8 years ago
Mapping a CDT field to a BLOB will not allow you to store or retrieve documents in DB. You have to use the plugin. I never used this plugin, but the documentation looks pretty simple. What is your problem?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mohammedz
Certified Associate Developer
over 8 years ago
@stefan791
We have three parameters
Datastore and Documents are fine. But I dont understand how to pass the Query into Second parameter. Any Idea of passing it
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 8 years ago
Documentation says: Blob SQL Query (Please include "?" as parameter to refer to blob column in the column list and keep it as first parameter (i.e. "INSERT INTO [TABLE_NAME] ([BLOB_COLUMN]) VALUES (?)"))
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>