Skip to main content

Why is data getting converted to hex when loading from Pig?

  • October 10, 2014
  • 1 reply
  • 5 views

Ryan_Fitch_1
Forum|alt.badge.img+1
I'm trying to load data from a Pig script into a Vertica table. When the load completes I see all the text in the table converted to hex.

The script looks like this

tempReps = Load '/discovery/hbid_crd.csv' USING PigStorage(',');

STORE tempReps INTO '{hbid(HBID varchar, CRD_ID varchar, PROSPECT_IND varchar, STATUS_CODE varchar)}' USING   com.vertica.pig.VerticaStorer('ipaddress',  'database','5433','user','password');

1 reply

Ryan_Fitch_1
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • October 10, 2014
I figured it out, need to cast the data in Pig
tempReps = LOAD '/discovery/hbid_crd.csv' USING PigStorage(',') AS (hbid:chararray, CRD_ID:chararray, PROSPECT_IND:chararray, STATUS_CODE:chararray);