How to load hive external table or delimited file into pig?

I've stored a Hive query result to directory using

insert overwrite directory '/dir'
select ...

which creates a text-file with some delimiter, \1 or ^A or something..?

I'm able to create an external table from this file using

create external table mytable (
var1 string
)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\1'
STORED AS TEXTFILE
LOCATION '/dir'

How do I load this result to Pig? I've tried

u = load '/dir' using PigStorage('\1') as (var1:chararray);

..with no luck.

Any ideas?

Answers


Turned out it's PigStorage('\u0001')


Need Your Help

Update Google Doc from local file using google API possible ? (.NET / C# / WPF)

c# .net wpf google-api

I am currently testing the google API. It seems promising, but I am stuck at a "simple" problem. I want to update an existing document with a local copy.

yii2 redirect in init does it work or not?

redirect yii2 init

class TestController extends Controller {