Expand my Community achievements bar.

schema forcing minimum length for string data type

Avatar

Level 2

Why is the schema forcing me to set a minimum length for a string data type ... when we have numerous other schema dimensions without a minimum length?

6 Replies

Avatar

Community Advisor

@eldred it should be 1 minimum by default, you might have changed to zero, make it 1

RiteshY18_0-1745981739375.png

RiteshY18_1-1745981770787.png

 

 

Avatar

Community Advisor

Hi @eldred  - Your question is absolutely valid and surprising to everyone. When I went back and checked, here is the information: according to the recent AEP release and XDM changes, all new string fields are given a minimum length of one by default. Previously, no length was set for the string data type.

Document says - 
Verify minimum string lengths: All string fields should be at least one character in length, as string values should never be empty. Null values for non-required fields, however, are acceptable. New string fields are given a minimum length of one by default.
https://experienceleague.adobe.com/en/docs/experience-platform/release-notes/latest#xdm:~:text=retry...

Thank you,
Jayakrishnaa P.

How do we set a data element to default to null for non-required fields in the Tags UI?  In the data element default value field, if I just turn it on without a value then it returns an empty string which causes the dataset batch to fail since the value has less than 1 character.  If I enter "null" in the default value field (without the quotes) then it returns the string "null" which is not my intention at all.  

Avatar

Level 1

This appears to be a very poorly engineered update by Adobe, which they don't have a solution for it (I am assuming since they have not responded to your message.) It should not be enforcing a minimum length if the field is not required. But, luckily, their solution was so poorly engineered that you can get around it in the UI. Just go into the schema node, delete the "minimum length" value and click the apply button, then save. I did this and all my error went away. 

Avatar

Level 2

Thank you for the suggestion!  I was able to delete the "minimum length" in the schema as you described, but I'm still getting errors in my dataset batch when those fields are set to the empty string: "expected minLength: 1, actual: 0".  So unfortunately this is not working for me.

Avatar

Administrator

@eldred  Just checking in — were you able to resolve your issue?
We’d love to hear how things worked out. If the suggestions above helped, marking a response as correct can guide others with similar questions. And if you found another solution, feel free to share it — your insights could really benefit the community. Thanks again for being part of the conversation!



Kautuk Sahni