I have a complex object defined datatype to be logged on SQL Server through Ignition
Document Tag (other typologies return error) correctly reads the value through OPC
But it can't be logged on SQL Server and it's quarantined:
ERROR: com.microsoft.sqlserver.jdbc.SQLServerException: Conversion from UNKNOWN to VARCHAR is not supported;
How can I fix?
Thank you and BR,
You cannot historize document or dataset tag types.
Thank you for response, neither by writing a custom script?
It isn't so much an Ignition problem as a limitation of generic JDBC. As in, not standardized. Many databases will accept document-style data as JSON, where you supply the string format to the DB. That can be scripted, but to your own DB tables, not to the historian.
Use expression or derived tags to pull the structure members into their own atomic tags, of a tag type that can be historized, and turn on history for those tags.