Data type conversion using Wrangler

1,148 views
Skip to first unread message

Franz Bermeo Quezada

unread,
Nov 28, 2021, 9:55:32 PM11/28/21
to CDAP User
Hi All

Using a Wrangler component in Cloud Data Fusion I'm trying to convert the data type from Decimal to Integer, but always a I get the execution error message:

org.apache.avro.UnresolvedUnionException: Not in union [{"type":"bytes","logicalType":"decimal","precision":16,"scale":3},"null"]

Have you and idea how to fix this issue?? Using or not a wrangler component, but I need to convert Decimal to Integer (or Long type) and finally save that information on a BigQuery dataset
 
Please your help and guidance.

Prashant Jaikumar

unread,
Nov 29, 2021, 7:11:34 PM11/29/21
to cdap...@googlegroups.com
Hi,

Try something like this - 
set-column :output_col decimal_col.intValue()

You can find documentation here.

Prashant

--
You received this message because you are subscribed to the Google Groups "CDAP User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cdap-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cdap-user/18d9609c-4de7-421f-be3e-3d657e08ce5dn%40googlegroups.com.

Franz Bermeo Quezada

unread,
Dec 1, 2021, 8:24:29 AM12/1/21
to CDAP User
Hi @Prashant

In fact, I already have used the directive that you mention and also set-type :column type. In both cases, I always got an conversion type error.

According your experience, have you any other idea?

Viral Kothari

unread,
Dec 12, 2021, 8:35:31 PM12/12/21
to CDAP User
We are also facing exactly the same issue. 

We are doing lift and shift from on prem Oracle to BigQuery

Reply all
Reply to author
Forward
0 new messages