Variable and schema declaration in PIG

How to declare a variable in PIG? suppose I want to have an integer to have values ​​like 10, how can I declare it in a script? and how can you reuse the circuit?

+4
source share
1 answer

I think you can use the declare command. It is used to describe a single parameter and is used in a PIG script.

%declare DESC 'Database' A = load 'data' as (name, desc); B = FILTER A by desc eq '$DESC'; ..... 

You can find out about it here. Pig parameters

+8
source

Source: https://habr.com/ru/post/1393913/


All Articles