SQL0670N The statement failed because the row size of the resulting table would have exceeded the row size limit

1.1k Views Asked by At

When working with the Cloudant SDP, I have encountered the following error:

SQL0670N The statement failed because the row size of the resulting table would have exceeded the row size limit.

What does the error mean, and how can I fix it?

1

There are 1 best solutions below

0
On BEST ANSWER

The problem is caused because there is one or more key(s) in Cloudant with a very long string value. The error gives a hint to the problem:

SQLERRMC=32677;;72156

This is saying that the table size limit is 32K (32677), but the create statement was trying to create a table with size 72K (72156).

The following options are available as work-arounds:

  1. Identify and remove the problem attributes from the source dataset
  2. Create a view on the source dataset that excludes the problem attribute

Unfortunately, this process may be trial-and-error if you have a lot of attributes in your documents.