Hello @Miguel Buenestado ,
Thanks for the question and using MS Q&A platform.
As we understand the ask here is "Unsupported data type error. Statement references a data type that is unsupported in Parallel Data Warehouse, or there is an expression that yields an unsupported data type" . Modify the statement and re-execute it., please do let us know if its not accurate.
I am assuming that the error is on the line 26 . When I checked rv.[value] the datatype is SQL_Variant .

and from the doc here i see that we do can convert SQL_variant to varchar : https://learn.microsoft.com/en-us/sql/t-sql/data-types/sql-variant-transact-sql?view=sql-server-ver16
Can you please try to create a table ( for testing ) and perfomr a INSERT with the below logic .
SELECT DISTINCT d_boundary_key AS partition_key
FROM DIM_DATE dat
INNER JOIN STAGING_XXXX stg
ON dat.c_date_id = stg.c_date_id
and then try to perform the JOIN .
Also can you please share the schema details for DIM_DATE & STAGING_XXXX tables ?
Please do let me if you have any queries.
Thanks
Himanshu
- Please don't forget to click on
or upvote
button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how - Want a reminder to come back and check responses? Here is how to subscribe to a notification
- If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators