Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

When using the api /loaddata command, you may get the following error: 

Specified key was too long; max key length is 3072 bytes

This error message relates to business keys. The loaddata command assumes that each key can have up to 255 characters. When there are multiple business keys, it will create a temp table with a column that is a concatenation of those keys. Then it may happen that their length will exceed the limit 

Using the maxJoinFieldsLenghts parameter you can tell loaddata that it is not needed to reserve 255 chars; instead you put there the real lengths (based on your knowledge of the data being loaded). Using this parameter will save a lot of space.

​​​​​{....
"maxJoinFieldsLengths": [
  {​​​​​​​​"joinField": "sku", "maxLength": 3}​​​​​​​​,
  {​​​​​​​​"joinField": "name", "maxLength": 4}​​​​​​​​,
  {​​​​​​​​"joinField": "attribute1", "maxLength": 1}​​​​​​​​,
  {​​​​​​​​"joinField": "attribute2", "maxLength": 1}​​​​​​​​,
  {​​​​​​​​"joinField": "attribute3", "maxLength": 1}​​​​​​​​,
  {​​​​​​​​"joinField": "attribute4", "maxLength": 1}​​​​​​​​,
  {​​​​​​​​"joinField": "attribute5", "maxLength": 3}​​​​​​​​
  ]
...}​​​​​​​​
  • No labels