Co-Authored By:

Asked by: Neyva Zhiryakov
technology and computing databasesWhat is the default data type of fields in pig?
Last Updated: 26th January, 2020
Click to see full answer.
Then, what are the complex data types in pig?
Complex Types. Pig has three complex data types: maps, tuples, and bags. All of these types can contain data of any type, including other complex types. So it is possible to have a map where the value field is a bag, which contains a tuple where one of the fields is a map.
Subsequently, question is, what is relation in pig? A Pig relation is a bag of tuples. A Pig relation is similar to a table in a relational database, where the tuples in the bag correspond to the rows in a table.
Just so, what is flatten in pig?
The FLATTEN operator which is an arithmetic operator looks like a UDF syntactically, but it is actually an operator that changes the structure of tuples and bags in a way that a UDF cannot. Flatten un-nests tuples as well as bags. For tuples, flatten substitutes the fields of a tuple in place of the tuple.
Is Pig Latin case sensitive?
Keywords in Pig Latin are not case-sensitive; for example, LOAD is equivalent to load . But relation and field names are, so A = load 'foo'; is not equivalent to a = load 'foo'; . UDF names are also case-sensitive; thus, COUNT is not the same UDF as count .