Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Tutorials
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

What is the maximum length of the primary key in Unicode?

Solved786 views4th April 2022
5
filiep geeraert [SLC]83 1st April 2022 0 Comments

Hi, while developing a protocol in my spare time, I stumbled upon an issue.
I was using the Unicode option, as I wanted to use the € sign in one of the strings in a table.

For another table I wanted to use the name of a person followed by two numbers, example : Jan.Janssens.1.1 as the primary key.
This was a retrieved table, and the data in that table was being saved.
I found that if the total length of the string of the key is a bit higher than expected, the rows could be added to the table, but upon restarting of the element, the keys are cut off, and only one line remains.
The limit seems to be at 26 characters, from 27 onwards it cuts them off.
That is to say, it still saves the whole key, but it seems to limit the check for duplicates on 26 characters.

Now I was just wondering if this is intended behaviour or not.

In order to reproduce : make a simple protocol with a table (of type retrieved), and with the key column, and a second column of type string, with the save option.
Use the Unicode option so that the protocol uses Unicode
Make a Qaction that clears the table, and adds a couple of lines with a long primary key (27 or more characters) :

for example :
UNICODE long key limit.1.1
UNICODE long key limit.1.2
UNICODE long key limit.1.3
UNICODE long key limit.1.4

Make a button that calls the Qaction.
Now push the button, see how the rows are added.
Next, restart the element.
Notice how all but one rows disappear.

filiep geeraert [SLC] Selected answer as best 4th April 2022

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
6
Simon Vandamme [SLC] [DevOps Advocate]942 Posted 4th April 2022 3 Comments

Hi Filiep,

This is indeed expected behavior.
In the database, the first 100 bytes of a primary key must be unique.

By default, UTF-8-char encoding is used, which encodes a char in as many bytes as required, with a max of 4. Chars from the ASCII char set are encoded using a single byte, so if your key is only made of ASCII chars, the first 100 chars must be unique. In a worst-case scenario, all chars take up 4 bytes, meaning that the first 25 chars must be unique.

When using the Unicode option, chars typically take up 4 bytes, meaning that the first 25 chars must be unique.

In any case, note that for performance reasons, the Primary Key should always be as small as possible and ideally should be a number.

When your identifiers become relatively large, it's better to create primary keys yourself (start with '1' and increment the value for each new row) and create a mapping between those primary keys and your identifiers.

filiep geeraert [SLC] Selected answer as best 4th April 2022
Simon Vandamme [SLC] [DevOps Advocate] commented 4th April 2022

See following sections in our protocol development documentation for more info:
– https://docs.dataminer.services/develop/codingguidelines/Protocol/Primary_keys1.html
– https://docs.dataminer.services/develop/devguide/Connector/UIComponentsTablePrimaryKeys.html

filiep geeraert [SLC] commented 4th April 2022

OK, it’s a pity that you cannot override this limit for a particular table.
I will have to do some rewriting for my protocol then.
Should there not be a warning when you go beyond that 25 character limit for your keys?
I do not get any duplicate key messages, and it seems that the whole key is saved, only the checking part is where the limit of 25 bytes exists.

Simon Vandamme [SLC] [DevOps Advocate] commented 4th April 2022

I fully agree with your suggestion of generating a warning or error log when one goes beyond the 100 bytes for a primary key so feel free to make a feature suggestion there.
Regarding the configuration of such limit, I’m not sure if it’s worth making such change. In then end, it’s still recommended to keep it as small as possible and making the mapping between an auto-generated numeric key and your identifier is not that much work. Having it configurable would feel to me like opening a door leading to inefficient implementations so I’m currently not convinced that we should go there.

Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas

Recent questions

Correlation Engine: “Test rule” doesn’t result in a hit, despite functional rule 1 Answer | 3 Votes
When using the Setter = true attribute, will the copy action always be executed first? 1 Answer | 3 Votes
Multiple Set on Table parameters for DVE’s 1 Answer | 2 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (109) Correlation (69) Correlation rule (52) Cube (150) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (140) driver (65) DVE (56) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (152) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin