While configuring a conditional split component with the following expression:
[VersionStamp_Source] == (DT_I8)[VersionStamp_Destination]
I am getting the following error:
The data type DT_BYTES cannot be used with binary operator "==".
Screenshot:
CodePudding user response:
As shown in the error message, one of the columns used in the conditional split expression has a data type of DT_BYTES
which cannot be compared using binary operators.
You need to cast this column to another data type. As mentioned in the
As @billinkc mentioned in the comments, casting DT_BYTES
to a string data type is more preferable since some values cannot be converted to an 8-byte integer.
To solve your problem, try using the following expression:
(DT_WSTR,255)[VersionStamp_Source] == (DT_WSTR,255)[VersionStamp_Destination]
Also, make sure to use an accurate length for the string casting operator. You can increase the string length to 4000