summaryrefslogtreecommitdiffstats
path: root/vespa-hadoop/src/test/pig/feed_create_operations_short_form.pig
blob: 348616f00ad73819690e11dfcfec7f70bd3f785b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-- REGISTER vespa-hadoop.jar  -- Not needed in tests

-- Transform tabular data to a Vespa document operation JSON format
-- as part of storing the data.
DEFINE VespaStorage
       com.yahoo.vespa.hadoop.pig.VespaStorage(
            'create-document-operation=true',
            'operation=put',
            'docid=id:<application>:metrics::<name>-<date>'
       );

-- Load tabular data
metrics = LOAD 'src/test/resources/tabular_data.csv' AS (date:chararray, name:chararray, value:int, application:chararray);

-- Store into Vespa
STORE metrics INTO '$ENDPOINT' USING VespaStorage();