RamohanReddy
RamohanReddy

Reputation: 3

data is converting to binary format while loading data into monet db using Apache pig

I am using MonetDb-Pig layer to load the csv data into Monet db. Internally it is using Binarybulkload commands to load the data but after loading data into table, the csv file values are not not matching with Monet db table values(int ,double).Seems to be data converted into binary format.

How can we get back the actual values in monetdb? .

Table Structure that I am using CREATE TABLE "test" ( "s_suppkey" INT, "s_name" CLOB, "s_address" CLOB, "s_nationkey" INT, "s_phone" CLOB, "s_acctbal" DOUBLE, "s_comment" CLOB );

Load command that I am using COPY BINARY INTO "test" FROM ( '$PATH/part-1/col-0.bulkload', '$PATH/part-1/col-1.bulkload', '$PATH/part-1/col-2.bulkload', '$PATH/part-1/col-3.bulkload', '$PATH/part-1/col-4.bulkload', '$PATH/part-1/col-5.bulkload', '$PATH/part-1/col-6.bulkload' );

Upvotes: 0

Views: 116

Answers (2)

Daksh
Daksh

Reputation: 308

please convert byte buffer from BigEndian to LittleEndian, and check

Upvotes: 0

mkersten
mkersten

Reputation: 714

The information provided is insufficient to isolate the issue. The most probable issue is a mis-alignment of the number of values in each of the binary columns.

Check the size of the elements in 's_acctbal' input file, to see if it produced Floats instead of Double binary values.

btw. the MonetDB-Pig project is not actively maintained, but we welcome patches.

Upvotes: 0

Related Questions