{"id":163,"date":"2021-07-12T06:29:06","date_gmt":"2021-07-12T06:29:06","guid":{"rendered":"https:\/\/www.wikitechy.com\/interview-questions\/?p=163"},"modified":"2021-09-15T04:59:49","modified_gmt":"2021-09-15T04:59:49","slug":"what-is-the-usage-of-foreach-operation-in-pig-scripts","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts\/","title":{"rendered":"What is the usage of FOREACH operation in Pig scripts ?"},"content":{"rendered":"<div class=\"TextHeading\">\n<div class=\"hddn\">\n<h2 id=\"usage-of-foreach-operation-in-pig-scripts\" class=\"color-green\" style=\"text-align: justify;\">Usage of FOREACH operation in Pig scripts<\/h2>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>The FOREACH operator is used to generate specified data transformations based on the column data.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"TextHeading\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"syntax\" class=\"color-green\">Syntax:<\/h2>\n<\/div>\n<\/div>\n<div class=\"CodeContent\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<figure class=\"highlight\"><div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-bash code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-bash code-embed-code\">grunt> Relation_name2 = FOREACH Relatin_name1 GENERATE (required data);<\/code><\/pre> <\/div><\/figure>\n<\/div>\n<\/div>\n<p style=\"text-align: justify;\">Pig FOREACH can be used in two ways:<\/p>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ol>\n<li>Simple FOREACH\u2026GENERATE<\/li>\n<li>Nested FOREACH {\u2026GENERATE }<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<div class=\"TextHeading\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"simple-foreachgenerate\" class=\"color-green\">Simple FOREACH\u2026GENERATE:<\/h2>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>This is simple to use the FOREACH\u2026GENERATE in a single line of pig statement to generate the columns that we need.<\/li>\n<li>Relation_Name = FOREACH <Previous Relation Name> GENERATE column1, column2\u2026..;<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"TextHeading\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"nested-foreach-generate\" class=\"color-green\">Nested FOREACH {\u2026GENERATE }<\/h2>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>Use operators such as DISTINCT, FILTER, LIMIT, ORDER and SAMPLE.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"TextHeading\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"syntax-2\" class=\"color-green\">Syntax:<\/h2>\n<\/div>\n<\/div>\n<div class=\"CodeContent\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<figure class=\"highlight\"><div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-markdown code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markdown code-embed-code\">Relation_Name = FOREACH Nested_Relation_Name {Inner Relation = Nested_Operation; GENERATE expression [, expression \u2026] };<\/code><\/pre> <\/div><\/figure>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>It should be taken set of expressions and it applied to every record in the data pipeline, hence define as FOREACH.<\/li>\n<li>The pipeline to next operator.For those database, it is Pig\u2019s projection operator.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>For example, the code loads an entire record, then it removes all user and id fields from each record:<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>A = load \u2018input\u2019 as (user:chararray, id:long, address:chararray, phone:chararray, preferences:map[]);<\/li>\n<li>B = foreach A generate user, id;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"ImageContent\">\n<div class=\"hddn\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-medium\" src=\"https:\/\/cdn.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts.png\" alt=\"what-is-the-usage-of-foreach-operation-in-pig-scripts\" width=\"980\" height=\"594\" \/><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Answer:The FOREACH operator is used to generate specified data transformations based on the column data.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[456],"tags":[195,365,509,491,551,203,199,214,209,488,205,485,486,222,484,490,196,286,550,207,487,217,548,552,546,545,477,508,517,518,519,544,468,489,493,367,483,549,555,492,200,197,280,364,285],"class_list":["post-163","post","type-post","status-publish","format-standard","hentry","category-apache-pig","tag-accenture-interview-questions-and-answers","tag-amazon-development-centre-india-pvt-ltd-interview-questions-and-answers","tag-apache-pig-interview-questions","tag-applied-materials-interview-questions-and-answers","tag-assert-operator-in-pig","tag-capgemini-interview-questions-and-answers","tag-casting-networks-india-pvt-limited-interview-questions-and-answers","tag-cgi-group-inc-interview-questions-and-answers","tag-collabera-technologies-interview-questions-and-answers","tag-crisil-limited-interview-questions-and-answers","tag-dell-international-services-india-pvt-ltd-interview-questions-and-answers","tag-ernst-young-interview-questions-and-answers","tag-exide-industries-interview-questions-and-answers","tag-flipkart-interview-questions-and-answers","tag-genpact-interview-questions-and-answers","tag-hexaware-technologies-interview-questions-and-answers","tag-ibm-interview-questions-and-answers","tag-lt-infotech-interview-questions-and-answers","tag-limit-rows-in-pig","tag-mphasis-interview-questions-and-answers","tag-myntra-designs-pvt-ltd-interview-questions-and-answers","tag-peoplestrong-interview-questions-and-answers","tag-pig-evaluation-operators","tag-pig-foreach-generate-example","tag-pig-generate-all-columns","tag-pig-generate-group","tag-pig-interview-questions","tag-pig-interview-questions-and-answers","tag-pig-interview-questions-and-answers-for-experienced","tag-pig-interview-questions-for-experienced","tag-pig-interview-questions-for-experienced-and-freshers","tag-pig-nested-foreach-filter","tag-pig-practice-questions","tag-prokarma-softech-nterview-questions-and-answers","tag-quintiles-interview-questions-and-answers","tag-rbs-india-development-centre-pvt-ltd-interview-questions-and-answers","tag-reliance-industries-ltd-interview-questions-and-answers","tag-store-operator-in-pig","tag-stream-function-in-pig","tag-syngene-international-limited-interview-questions-and-answers","tag-tech-mahindra-interview-questions-and-answers","tag-unitedhealth-group-interview-questions-and-answers","tag-virtusa-consulting-services-pvt-ltd-interview-questions-and-answers","tag-wells-fargo-interview-questions-and-answers","tag-xoriant-solutions-pvt-ltd-interview-questions-and-answers"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is the usage of FOREACH operation in Pig scripts ? - Apache Pig<\/title>\n<meta name=\"description\" content=\"What is the usage of FOREACH operation in Pig scripts ? - pig interview questions and answers for experienced - The FOREACH operator is used to generate specified data\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is the usage of FOREACH operation in Pig scripts ? - Apache Pig\" \/>\n<meta property=\"og:description\" content=\"What is the usage of FOREACH operation in Pig scripts ? - pig interview questions and answers for experienced - The FOREACH operator is used to generate specified data\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts\/\" \/>\n<meta property=\"og:site_name\" content=\"Wikitechy\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-12T06:29:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-15T04:59:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts.png\" \/>\n<meta name=\"author\" content=\"Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Editor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/apache-pig\\\/what-is-the-usage-of-foreach-operation-in-pig-scripts\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/apache-pig\\\/what-is-the-usage-of-foreach-operation-in-pig-scripts\\\/\"},\"author\":{\"name\":\"Editor\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/4d5a581fb5470d1560324bddc5e8b757\"},\"headline\":\"What is the usage of FOREACH operation in Pig scripts ?\",\"datePublished\":\"2021-07-12T06:29:06+00:00\",\"dateModified\":\"2021-09-15T04:59:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/apache-pig\\\/what-is-the-usage-of-foreach-operation-in-pig-scripts\\\/\"},\"wordCount\":222,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/apache-pig\\\/what-is-the-usage-of-foreach-operation-in-pig-scripts\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.wikitechy.com\\\/interview-questions\\\/apache-pig\\\/what-is-the-usage-of-foreach-operation-in-pig-scripts.png\",\"keywords\":[\"Accenture interview questions and answers\",\"Amazon Development Centre India Pvt Ltd interview questions and answers\",\"apache pig interview questions\",\"Applied Materials interview questions and answers\",\"assert operator in pig\",\"Capgemini interview questions and answers\",\"CASTING NETWORKS INDIA PVT LIMITED interview questions and answers\",\"CGI Group Inc interview questions and answers\",\"Collabera Technologies interview questions and answers\",\"CRISIL LIMITED interview questions and answers\",\"Dell International Services India Pvt Ltd interview questions and answers\",\"Ernst &amp; Young interview questions and answers\",\"Exide Industries interview questions and answers\",\"Flipkart interview questions and answers\",\"Genpact interview questions and answers\",\"Hexaware Technologies interview questions and answers\",\"IBM interview questions and answers\",\"L&amp;T Infotech interview questions and answers\",\"limit rows in pig\",\"Mphasis interview questions and answers\",\"Myntra Designs Pvt. Ltd interview questions and answers\",\"PeopleStrong interview questions and answers\",\"pig evaluation operators\",\"pig foreach generate example\",\"pig generate all columns\",\"pig generate group\",\"pig interview questions\",\"pig interview questions and answers\",\"pig interview questions and answers for experienced\",\"pig interview questions for experienced\",\"Pig Interview Questions for experienced and freshers\",\"pig nested foreach filter\",\"pig practice questions\",\"Prokarma Softech nterview questions and answers\",\"Quintiles interview questions and answers\",\"RBS India Development Centre Pvt Ltd interview questions and answers\",\"Reliance Industries Ltd interview questions and answers\",\"store operator in pig\",\"stream function in pig\",\"Syngene International Limited interview questions and answers\",\"Tech Mahindra interview questions and answers\",\"UnitedHealth Group interview questions and answers\",\"Virtusa Consulting Services Pvt Ltd interview questions and answers\",\"Wells Fargo interview questions and answers\",\"Xoriant Solutions Pvt Ltd interview questions and answers\"],\"articleSection\":[\"Apache Pig\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/apache-pig\\\/what-is-the-usage-of-foreach-operation-in-pig-scripts\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/apache-pig\\\/what-is-the-usage-of-foreach-operation-in-pig-scripts\\\/\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/apache-pig\\\/what-is-the-usage-of-foreach-operation-in-pig-scripts\\\/\",\"name\":\"What is the usage of FOREACH operation in Pig scripts ? - Apache Pig\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/apache-pig\\\/what-is-the-usage-of-foreach-operation-in-pig-scripts\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/apache-pig\\\/what-is-the-usage-of-foreach-operation-in-pig-scripts\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.wikitechy.com\\\/interview-questions\\\/apache-pig\\\/what-is-the-usage-of-foreach-operation-in-pig-scripts.png\",\"datePublished\":\"2021-07-12T06:29:06+00:00\",\"dateModified\":\"2021-09-15T04:59:49+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/4d5a581fb5470d1560324bddc5e8b757\"},\"description\":\"What is the usage of FOREACH operation in Pig scripts ? - pig interview questions and answers for experienced - The FOREACH operator is used to generate specified data\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/apache-pig\\\/what-is-the-usage-of-foreach-operation-in-pig-scripts\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/apache-pig\\\/what-is-the-usage-of-foreach-operation-in-pig-scripts\\\/#primaryimage\",\"url\":\"https:\\\/\\\/cdn.wikitechy.com\\\/interview-questions\\\/apache-pig\\\/what-is-the-usage-of-foreach-operation-in-pig-scripts.png\",\"contentUrl\":\"https:\\\/\\\/cdn.wikitechy.com\\\/interview-questions\\\/apache-pig\\\/what-is-the-usage-of-foreach-operation-in-pig-scripts.png\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#website\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/\",\"name\":\"Wikitechy\",\"description\":\"Interview Questions\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/4d5a581fb5470d1560324bddc5e8b757\",\"name\":\"Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"caption\":\"Editor\"},\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/author\\\/editor\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is the usage of FOREACH operation in Pig scripts ? - Apache Pig","description":"What is the usage of FOREACH operation in Pig scripts ? - pig interview questions and answers for experienced - The FOREACH operator is used to generate specified data","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts\/","og_locale":"en_US","og_type":"article","og_title":"What is the usage of FOREACH operation in Pig scripts ? - Apache Pig","og_description":"What is the usage of FOREACH operation in Pig scripts ? - pig interview questions and answers for experienced - The FOREACH operator is used to generate specified data","og_url":"https:\/\/www.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts\/","og_site_name":"Wikitechy","article_published_time":"2021-07-12T06:29:06+00:00","article_modified_time":"2021-09-15T04:59:49+00:00","og_image":[{"url":"https:\/\/cdn.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts.png","type":"","width":"","height":""}],"author":"Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Editor","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts\/#article","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts\/"},"author":{"name":"Editor","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757"},"headline":"What is the usage of FOREACH operation in Pig scripts ?","datePublished":"2021-07-12T06:29:06+00:00","dateModified":"2021-09-15T04:59:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts\/"},"wordCount":222,"commentCount":0,"image":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts.png","keywords":["Accenture interview questions and answers","Amazon Development Centre India Pvt Ltd interview questions and answers","apache pig interview questions","Applied Materials interview questions and answers","assert operator in pig","Capgemini interview questions and answers","CASTING NETWORKS INDIA PVT LIMITED interview questions and answers","CGI Group Inc interview questions and answers","Collabera Technologies interview questions and answers","CRISIL LIMITED interview questions and answers","Dell International Services India Pvt Ltd interview questions and answers","Ernst &amp; Young interview questions and answers","Exide Industries interview questions and answers","Flipkart interview questions and answers","Genpact interview questions and answers","Hexaware Technologies interview questions and answers","IBM interview questions and answers","L&amp;T Infotech interview questions and answers","limit rows in pig","Mphasis interview questions and answers","Myntra Designs Pvt. Ltd interview questions and answers","PeopleStrong interview questions and answers","pig evaluation operators","pig foreach generate example","pig generate all columns","pig generate group","pig interview questions","pig interview questions and answers","pig interview questions and answers for experienced","pig interview questions for experienced","Pig Interview Questions for experienced and freshers","pig nested foreach filter","pig practice questions","Prokarma Softech nterview questions and answers","Quintiles interview questions and answers","RBS India Development Centre Pvt Ltd interview questions and answers","Reliance Industries Ltd interview questions and answers","store operator in pig","stream function in pig","Syngene International Limited interview questions and answers","Tech Mahindra interview questions and answers","UnitedHealth Group interview questions and answers","Virtusa Consulting Services Pvt Ltd interview questions and answers","Wells Fargo interview questions and answers","Xoriant Solutions Pvt Ltd interview questions and answers"],"articleSection":["Apache Pig"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts\/","url":"https:\/\/www.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts\/","name":"What is the usage of FOREACH operation in Pig scripts ? - Apache Pig","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts\/#primaryimage"},"image":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts.png","datePublished":"2021-07-12T06:29:06+00:00","dateModified":"2021-09-15T04:59:49+00:00","author":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757"},"description":"What is the usage of FOREACH operation in Pig scripts ? - pig interview questions and answers for experienced - The FOREACH operator is used to generate specified data","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts\/#primaryimage","url":"https:\/\/cdn.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts.png","contentUrl":"https:\/\/cdn.wikitechy.com\/interview-questions\/apache-pig\/what-is-the-usage-of-foreach-operation-in-pig-scripts.png"},{"@type":"WebSite","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website","url":"https:\/\/www.wikitechy.com\/interview-questions\/","name":"Wikitechy","description":"Interview Questions","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757","name":"Editor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","caption":"Editor"},"url":"https:\/\/www.wikitechy.com\/interview-questions\/author\/editor\/"}]}},"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/163","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/comments?post=163"}],"version-history":[{"count":4,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/163\/revisions"}],"predecessor-version":[{"id":3763,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/163\/revisions\/3763"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/media?parent=163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/categories?post=163"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/tags?post=163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}