Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-3879

Script fails with multiple STORE statements unless multiquery is off

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.12.0
    • None
    • None
    • None

    Description

      We are having an issue with multiple store statements in the same script. The STORE fails to insert the records into the database. The script is roughly as follows...

      A = LOAD '...' USING CSVLoader ...;
      STORE A INTO '/tmp/A-unused' USING DBStorage (org.postgresql.Driver, ..., INSERT INTO ....);
      B = FOREACH A GENERATE X, Y, CONCAT(X, Y) as Z;
      STORE B INTO '/tmp/B-unused' USING DBStorage (org.postgresql.Driver, ..., INSERT INTO ....);
      

      Both DBStorage calls insert into different tables in the same database.

      When the script is run both A, B are stored into their /tmp/ locations. However, the data never makes it into the database. We found two ways to get the data to make it into the database. The first, was to add a DUMP B command after the assignment of B. The second was to execute the script with the -M flag.

      Attachments

        1. PIG-3879-1.patch
          20 kB
          Daniel Dai

        Activity

          People

            Unassigned Unassigned
            tmfinnell Taylor Finnell
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: