Skip to main content
April 30, 2024
Question

How to query data for a field of type varchar(max) from Database

  • April 30, 2024
  • 7 replies
  • 0 views

Hi All

I have a requirement where I have to query the data from database for a particular column of type varchar(max) which has data more than 1 MB .

While fetching the data from query entity, I am getting memory threshold error.

Please recommend me some way of how can we fetch more than 1 mb data.

Many thanks in Advance!

7 replies

harshk1671
April 30, 2024

Hi yogeshc8494,

Can you elaborate more about the use case? Why you need more than 1 MB data in Appian SAIL or PM?

April 30, 2024

Hi [mention:8e5a7a058e4f4768ba94c8d9526dd3e4:e9ed411860ed4f2ba0265705b8793d05] 

We need to send the  Appian document to the external system and the external system is a soap service.

The External system only accepts documents in base 64 format.

So, I am using plugin [mention:e7b082a6b98049899e3541011e57f30e:f7d226abd59f475c9d224a79e3f0ec07] .to covert document to base 64 format.

This plugin helps to store document data in base 64 format. So I have to retrieve the data and send that base 64 data in Request body of soap web service.

While retrieving the data of base 64 document field from database, I am getting memory threshold error.

harshk1671
April 30, 2024

Hi yogeshc8494,

AFAIK, custom plugin should be the option as Stefan suggested. You can also check with Appian support for other options.

If you can also tell how you are receiving base 64 in DB? If it is from a API call then Appian has OOTB functionality to convert it to document.

stefanhelzle0001
Brainy
April 30, 2024

I think that trying to load more than 1 MB of data into memory is not a good solution. Help us to understand the purpose and we can help to find other options.

April 30, 2024

Hi [mention:a11f77a729fb4db2af76b09948583328:e9ed411860ed4f2ba0265705b8793d05] 

We need to send the  Appian document to the external system and the external system is a soap service.

The External system only accepts documents in base 64 format.

So, I am using plugin Base64 Document Database Integration .to covert document to base 64 format.

This plugin helps to store document data in base 64 format. So I have to retrieve the data and send that base 64 data in Request body of soap web service.

While retrieving the data of base 64 document field from database, I am getting memory threshold error.

stefanhelzle0001
Brainy
April 30, 2024

I understand. IMHO, this is the end of what you can/should do with standard Appian. I suggest to consider building a custom plugin to handle these calls. You could use the existing plugin "Advanced Call Webservice" to start with.

davidj137213
Brainy
April 30, 2024

Try to make several querys, each one of them consulting one portion of that data, but as Stefan says, it's not a good approach to have the data stored in that way,