Unicode String Mapping Issues


Facing mapping issues with Unicode fields. Have one SQL Server intelligent db adapter running. And the input document contains all Unicode string fields irrespective of the real data type in table.

Case 1: Mapping the input document to a configured insert operation template. The insert operation takes the column data type from table which could not be changed for inputs. Unicode string to the respective real data type to the table. Mapping fails when mapping a date value from Unicode to datetime type, and inserts null values in table.

Case 2: Mapping input document to a configured Custom SQL operation template. In custom SQL all inputs are default created as Unicode which could not be changed. Now the mapping is from Unicode (input document) to Unicode (Resource operation). But the all fields are mapped as constants that is if the value is ‘XYZ’ value, it is mapped as XYZ. So the insert fails as no literal constants allowed to insert in a string field. Tried to use :v as a place holder, then the values are become ? for each field.

If anybody faced this issue already please share your thoughts.



you can use a custom SQL (one record)operation in EAI using TO_DATE like
{sql}select to_date('{HIRE_DATE}’, ‘YYYYMMDD’)
and specify HIRE_DATE as Unicode string in the input tab and as Date in the Output tab. Then from your component call this operation (you have to do the mapping between the two fields HIRE_DATE in the custom operation) before your INSERT operation and map the DATE field to the Insert Operation field of Date (BrokerDate) .

Also, don’t forget to check the Allow unset fields box in the component properties tab to be able to insert NULL dates.

Hope this helps.



Thanks for your mail. I have done it by using a small trick. I used 4.1x version EI which allows to change the field type in the insert template, but 4.6 does not allow for this change of field type.