Historizing a large JSON string tag

Hi all,

I have a problem storing data from a tag containing a JSON string (or Python dictionary, if you will) within Ignition. Generally, the string exceeds the VARCHAR(255) character limit that is implemented in the tag historian tables (stringvalue column). Thus, a MySQL table cannot accept the value and refuses to historize it, causing the values to aggregate in store and forward.

I also cannot automate an alteration of that table column to VARCHAR(8191) or whatever, since tables are partitioned by day and millions of rows are being stored - tables that already exist are difficult to modify without errors, this may be unreliable.

Anyone have a good, alternative solution to this? Breaking the JSON string up into multiple columns? Turning the data into tags?

Best Regards,

You could probably create an expression tag which you can use to break up the string. Using the split function in the Expression editor, you can convert it into a dataset and extract the data you need from there. This is assuming the data in JSON format was converted into a string before hand.

Split function: https://docs.inductiveautomation.com/display/DOC/split

You can turn the data into tags using the jsonGet expression function.