Support Article
Not able to create class mapped to external SQL Server
Summary
User is trying to create an external mapped class via Designer Studio > Integration > Connectors > Connector and Metadata Wizard.
When user does that the message "Database table key column has unsupported data type: nvarchar" is shown.
Error Messages
Database table key column has unsupported data type: nvarchar
Steps to Reproduce
Create class that maps to external SQL Server with table that has nvarchar type columns.
Root Cause
A defect in Pegasystems’ code or rules.
There is no issue with nvarchar support on Pega 7.1.9 as the error message was due to missing check which only happens on Connector Meta Data Wizard and the same check was included in Pega 7.2 versions.
Resolution
Perform the following local-change:
Instead of using metadata wizard, user can do the following to map an external table to Pega class.
1.Create a table with required columns.
2.Create a Data-Admin-DB-Table instance with the a className pointing to the table.
3.Create a class definition with same name as in #2.
4.Create properties corresponding to all the columns in the class.
5.Resave both D-A-D-T and class definition.
6.Click on test connection in class definition. It should show the right class-table mapping.
Published February 12, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.