You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by "Cox, Jonathan A" <ja...@sandia.gov> on 2016/03/30 04:57:38 UTC

RE: [EXTERNAL] Re: How to use VARBINARY with CsvBulkLoadTool

Hi Sergey,

Thanks for getting back to me. So if I simply place base64 encoded ASCII in a column that maps to a VARBINARY in the table, it will automatically interpret it as base64 and decode/store it? I don't have to specify that my CSV file contains base64?

Thanks,
Jon

-----Original Message-----
From: sergey.soldatov@gmail.com [mailto:sergey.soldatov@gmail.com] On Behalf Of Sergey Soldatov
Sent: Tuesday, March 29, 2016 5:00 PM
To: user@phoenix.apache.org
Subject: [EXTERNAL] Re: How to use VARBINARY with CsvBulkLoadTool

Hi Jon,
Base64 is supposed to be.

Thanks,
Sergey

On Tue, Mar 29, 2016 at 12:38 PM, Cox, Jonathan A <ja...@sandia.gov> wrote:
> I am wondering how I can use the CsvBulkLoadTool to insert binary data 
> to a table. For one thing, which format does CsvBulkLoadTool expect 
> the data to be encoded as within the CSV, when inserted into a VARBINARY type? Hex?
> Base64? Something else? Is there a way to choose or specify?
>
>
>
> Thanks,
>
> Jon

RE: [EXTERNAL] Re: How to use VARBINARY with CsvBulkLoadTool

Posted by "Cox, Jonathan A" <ja...@sandia.gov>.
FYI for the group, I can confirm that this appears to work correctly and in an automatic fashion.

Thanks, Sergey.
-Jon

-----Original Message-----
From: sergey.soldatov@gmail.com [mailto:sergey.soldatov@gmail.com] On Behalf Of Sergey Soldatov
Sent: Wednesday, March 30, 2016 9:11 AM
To: user@phoenix.apache.org
Subject: Re: [EXTERNAL] Re: How to use VARBINARY with CsvBulkLoadTool

Hi Jon,
At least it's supposed to work in that way :) VARBINARY uses Base64.decode for String values.

Thanks,
Sergey

On Tue, Mar 29, 2016 at 7:57 PM, Cox, Jonathan A <ja...@sandia.gov> wrote:
> Hi Sergey,
>
> Thanks for getting back to me. So if I simply place base64 encoded ASCII in a column that maps to a VARBINARY in the table, it will automatically interpret it as base64 and decode/store it? I don't have to specify that my CSV file contains base64?
>
> Thanks,
> Jon
>
> -----Original Message-----
> From: sergey.soldatov@gmail.com [mailto:sergey.soldatov@gmail.com] On 
> Behalf Of Sergey Soldatov
> Sent: Tuesday, March 29, 2016 5:00 PM
> To: user@phoenix.apache.org
> Subject: [EXTERNAL] Re: How to use VARBINARY with CsvBulkLoadTool
>
> Hi Jon,
> Base64 is supposed to be.
>
> Thanks,
> Sergey
>
> On Tue, Mar 29, 2016 at 12:38 PM, Cox, Jonathan A <ja...@sandia.gov> wrote:
>> I am wondering how I can use the CsvBulkLoadTool to insert binary 
>> data to a table. For one thing, which format does CsvBulkLoadTool 
>> expect the data to be encoded as within the CSV, when inserted into a VARBINARY type? Hex?
>> Base64? Something else? Is there a way to choose or specify?
>>
>>
>>
>> Thanks,
>>
>> Jon

Re: [EXTERNAL] Re: How to use VARBINARY with CsvBulkLoadTool

Posted by Sergey Soldatov <se...@gmail.com>.
Hi Jon,
At least it's supposed to work in that way :) VARBINARY uses
Base64.decode for String values.

Thanks,
Sergey

On Tue, Mar 29, 2016 at 7:57 PM, Cox, Jonathan A <ja...@sandia.gov> wrote:
> Hi Sergey,
>
> Thanks for getting back to me. So if I simply place base64 encoded ASCII in a column that maps to a VARBINARY in the table, it will automatically interpret it as base64 and decode/store it? I don't have to specify that my CSV file contains base64?
>
> Thanks,
> Jon
>
> -----Original Message-----
> From: sergey.soldatov@gmail.com [mailto:sergey.soldatov@gmail.com] On Behalf Of Sergey Soldatov
> Sent: Tuesday, March 29, 2016 5:00 PM
> To: user@phoenix.apache.org
> Subject: [EXTERNAL] Re: How to use VARBINARY with CsvBulkLoadTool
>
> Hi Jon,
> Base64 is supposed to be.
>
> Thanks,
> Sergey
>
> On Tue, Mar 29, 2016 at 12:38 PM, Cox, Jonathan A <ja...@sandia.gov> wrote:
>> I am wondering how I can use the CsvBulkLoadTool to insert binary data
>> to a table. For one thing, which format does CsvBulkLoadTool expect
>> the data to be encoded as within the CSV, when inserted into a VARBINARY type? Hex?
>> Base64? Something else? Is there a way to choose or specify?
>>
>>
>>
>> Thanks,
>>
>> Jon