Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8459109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:15:27+00:00 2026-06-10T13:15:27+00:00

We aim to leverage PIG for largescale log analysis of our server logs. I

  • 0

We aim to leverage PIG for largescale log analysis of our server logs. I need to load a PIG map datatype from a file.

I tried running a sample PIG script with the following data.

A line in my CSV file, named ‘test’ (to be processed by PIG) looks like,

151364,[ref#R813,highway#secondary]

My PIG Script

a = LOAD 'test' using PigStorage(',') AS  (id:INT, m:MAP[]);
DUMP a;

The idea is to load an int and the second element as a hashmap.
However, when I dump, the int field get parsed correctly(and gets printed in the dump) but the map field is not parsed resulting in a parsing error.

Can someone please explain if I am missing something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T13:15:28+00:00Added an answer on June 10, 2026 at 1:15 pm

    I think there is a delimiter related problem (such as field-delimiter is somehow effecting parsing of map field or it is confused with map-delimiter).

    When this input data is used (notice I used semicolon as field-delimiter):

    151364;[ref#R813,highway#secondary]
    

    below is the output from my grunt shell:

    grunt> a = LOAD '/tmp/temp2.txt' using PigStorage(';') AS (id:int, m:[]);
    grunt> dump a;
    ...
    (151364,[highway#secondary,ref#R813])
    
    grunt> b = foreach a generate m#'ref'; 
    grunt> dump b;
    (R813)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My aim is to load an OpenLayers map using an external JS file. In
AIM: To output the contents of a log file line by line newest at
AIM: I would like to tail the last line of the file.txt and input
My aim is to create a map function like this map = function ()
Aim: Calling a very slow stored procedure (with parameters) asynchronously from code behind of
my aim is to pull data from mysql and print it in html table.
My aim is to implement the Single Log Out Protocol. First I am understanding
I'm trying to create a web forms server control and really wanted to leverage
My aim is to retrieve some data from a global array which is defined
My aim is to retrieve some data from a global array which is defined

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.