drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kunal Khatua" <ku...@apache.org>
Subject Re: Required help in apache drill
Date Fri, 20 Apr 2018 18:20:22 GMT
>> That's base 64 encoded data which turns out to be '1114502378'. 

Wow! That's some super power!  :D

On 4/20/2018 11:17:40 AM, Bob Rudis <bob@rud.is> wrote:
That's base 64 encoded data which turns out to be '1114502378'.

I cld have sworn Drill has built-in base64 conversion but I also wrote a UDF a while back
that has a simple decoding function to turn base64 to text (which is dangerous since base64
content could and often is binary).

https://gist.github.com/hrbrmstr/ce2c49c7d4b7027437728192e278781c has an outline of the code.

Alternately, you can perform whatever whittling down queries you need to (unless you need
to whittle down on the base64 encoded column) then yank the data into R, Python, Go, whatever
and do the base 64 decoding there.

> On Apr 20, 2018, at 1:47 PM, Kunal Khatua wrote:
> First, you're posting on the wrong mailing list. This should be posted in the user mailing
list, because this is meant for discussion of development features about Drill. As a result,
I'll cc to the dev list (so that you don't miss the reply), but you should carry on the conversation
in the User list.
> Now, coming back to your question, the encoded values you shared could be anything. What
you seem to be looking for is a way to decipher what the bytes that appear as "MTExNDUwMjM3OA=="
actually mean. This is tricky, if not impossible. Do you know what is the source of this data?
That might be carrying information about the encoding.
> If not, there might be online tools that can (perhaps) decode the bytes correctly.
> Drill provides that capability with the convert_to function : https://drill.apache.org/docs/supported-data-types/#data-types-for-convert_to-and-convert_from-functions
, but it seems you've already tried that.
> At this point, your best bet is to find the encoding of the source from where you got
this data.
> On 4/20/2018 8:46:56 AM, Lavanya Nuthalapati wrote:
> Hi Team,
> I have data with the encoded values "MTExNDUwMjM3OA==" , i wanted to decode
> it.
> Have tried convert_from and cast to varchar, nothing is working out.
> Can you please help on the same.
> It is very urgent your response is appreciated.
> Regards,
> Lavanya.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message