I want to get id from target table by lookup with NVarChar(Max) column in target table and NVarChar(20) column in source table. But raise error Cannot map the lookup colum
In your Lookup transformation, you need to cast the blob (nvarchar(max)) to a non-blob type. In this case, I would assume you need to cast it to nvarchar(20).
You will need to write a query in the lookup transformation and not just select the table.
Assuming the lookup table looks like
LookupTable
--------------
Column0 int
Column1 nvarchar(max)
Column2 nvarchar(500)
You query would look like
SELECT
L.Column0
, CAST(L.Column1 AS nvarchar(20)) AS Column1
, L.Column2
FROM
dbo.LookupTable L
You should now be able to perform a lookup on that column.
you cant:
The join can be a composite join, which means that you can join multiple columns in the transformation input to columns in the reference dataset. The transformation supports join columns with any data type, except for DT_R4, DT_R8, DT_TEXT, DT_NTEXT, or DT_IMAGE
are you sure you are using the component correctly? You usually lookup by ID to get the text. Can you give more details?