Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Prashant2
New Contributor

Oracle 'LONG RAW' column issue in the Fabric Data Pipeline

I have a Fabric Data Pipeline loading the Oracle data to a delta table.

 

I see that, the Oracle column with the "LONG RAW" data type is not getting any data. 

 

How to solve this issue  ?

 

Thanks!
Prashant 

1 ACCEPTED SOLUTION
v-karpurapud
Honored Contributor II

Hello @Prashant2 

 

Thank you for reaching out to the Microsoft Fabric Community. We understand that you are encountering an issue when loading data into a Delta table.

 

The issue arises because LONG RAW is a deprecated data type in Oracle, making it challenging to manage in modern data pipelines. As Microsoft Fabric does not natively support the Oracle LONG RAW data type.If possible, consider the following workaround:

 

Convert the LONG RAW column to a HEX-encoded string using the RAWTOHEX function.

 

  • Apply the RAWTOHEX function in your source query to transform the LONG RAW data into a HEX-encoded string.
  • Since HEX-encoded data is text-based, define the column as STRING in your Delta table schema.
  • This ensures that the Fabric Data Pipeline can load the data without issues.

 

If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.

 

Thank you.

View solution in original post

4 REPLIES 4
nilendraFabric
Honored Contributor

Hello @Prashant2 

 

`LONG RAW` is deprecated in Oracle and unsupported by Fabric’s Data Pipeline

 

Fabric’s Oracle connector struggles to map `LONG RAW` to Delta Lake’s binary type, resulting in empty or truncated data

Immediate Workaround: Convert to BLOB in Oracle, If you control the Oracle schema.

 

If schema changes aren’t possible:
• Use a SQL Query in the Copy Activity Source:

SELECT ID, NAME, TO_LOB(image_data) AS image_data_blob FROM your_table

 

In the pipeline’s copy activity settings:
• Set `Fault tolerance` > `Skip incompatible rows` to avoid job failures during type mismatches.

 

 

 

 

 

Then in notebook use something like

 

df = df.withColumn("image_data", expr("CAST(image_data AS BINARY)"))

 

If this helps. Please accept the answer 

 

v-karpurapud
Honored Contributor II

Hello @Prashant2 

Could you please confirm if your query have been resolved the solution provided by @nilendraFabric ? If they have, kindly mark the helpful response and accept it as the solution. This will assist other community members in resolving similar issues more efficiently.

Thank you

Hello,

TO_LOB function did not work for me.

I noticied that, "SELECT * FROM TABLE" is not truncating the LONG RAW columns, while its does not work if I use "SELECT LONG_COLNAME FROM TABLE" in the data pipeline. 

 

v-karpurapud
Honored Contributor II

Hello @Prashant2 

 

Thank you for reaching out to the Microsoft Fabric Community. We understand that you are encountering an issue when loading data into a Delta table.

 

The issue arises because LONG RAW is a deprecated data type in Oracle, making it challenging to manage in modern data pipelines. As Microsoft Fabric does not natively support the Oracle LONG RAW data type.If possible, consider the following workaround:

 

Convert the LONG RAW column to a HEX-encoded string using the RAWTOHEX function.

 

  • Apply the RAWTOHEX function in your source query to transform the LONG RAW data into a HEX-encoded string.
  • Since HEX-encoded data is text-based, define the column as STRING in your Delta table schema.
  • This ensures that the Fabric Data Pipeline can load the data without issues.

 

If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.

 

Thank you.

Helpful resources

Announcements
Users online (27)