Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-14217 Druid integration
  3. HIVE-14472

Read results for Druid Select query

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 2.3.0
    • Druid integration
    • None

    Description

      Format of results for Druid Select queries is as follows:

      [{
        "timestamp" : "2013-01-01T00:00:00.000Z",
        "result" : {
          "pagingIdentifiers" : {
            "wikipedia_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9" : 4
          },
          "events" : [ {
            "segmentId" : "wikipedia_editstream_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9",
            "offset" : 0,
            "event" : {
              "timestamp" : "2013-01-01T00:00:00.000Z",
              "robot" : "1",
              "namespace" : "article",
              "anonymous" : "0",
              "unpatrolled" : "0",
              "page" : "11._korpus_(NOVJ)",
              "language" : "sl",
              "newpage" : "0",
              "user" : "EmausBot",
              "count" : 1.0,
              "added" : 39.0,
              "delta" : 39.0,
              "variation" : 39.0,
              "deleted" : 0.0
            }
          }, {
            "segmentId" : "wikipedia_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9",
            "offset" : 1,
            "event" : {
              "timestamp" : "2013-01-01T00:00:00.000Z",
              "robot" : "0",
              "namespace" : "article",
              "anonymous" : "0",
              "unpatrolled" : "0",
              "page" : "112_U.S._580",
              "language" : "en",
              "newpage" : "1",
              "user" : "MZMcBride",
              "count" : 1.0,
              "added" : 70.0,
              "delta" : 70.0,
              "variation" : 70.0,
              "deleted" : 0.0
            }
          }, {
            "segmentId" : "wikipedia_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9",
            "offset" : 2,
            "event" : {
              "timestamp" : "2013-01-01T00:00:00.000Z",
              "robot" : "0",
              "namespace" : "article",
              "anonymous" : "0",
              "unpatrolled" : "0",
              "page" : "113_U.S._243",
              "language" : "en",
              "newpage" : "1",
              "user" : "MZMcBride",
              "count" : 1.0,
              "added" : 77.0,
              "delta" : 77.0,
              "variation" : 77.0,
              "deleted" : 0.0
            }
          }, {
            "segmentId" : "wikipedia_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9",
            "offset" : 3,
            "event" : {
              "timestamp" : "2013-01-01T00:00:00.000Z",
              "robot" : "0",
              "namespace" : "article",
              "anonymous" : "0",
              "unpatrolled" : "0",
              "page" : "113_U.S._73",
              "language" : "en",
              "newpage" : "1",
              "user" : "MZMcBride",
              "count" : 1.0,
              "added" : 70.0,
              "delta" : 70.0,
              "variation" : 70.0,
              "deleted" : 0.0
            }
          }, {
            "segmentId" : "wikipedia_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9",
            "offset" : 4,
            "event" : {
              "timestamp" : "2013-01-01T00:00:00.000Z",
              "robot" : "0",
              "namespace" : "article",
              "anonymous" : "0",
              "unpatrolled" : "0",
              "page" : "113_U.S._756",
              "language" : "en",
              "newpage" : "1",
              "user" : "MZMcBride",
              "count" : 1.0,
              "added" : 68.0,
              "delta" : 68.0,
              "variation" : 68.0,
              "deleted" : 0.0
            }
          } ]
        }
      } ]
      

      Out of this query results, we will generate Hive records with the following format:

      [ new TimestampWritable(new Timestamp(1356998400000L)), new Text("1"), new Text("article"), new Text("0"), new Text("0"), new Text("11._korpus_(NOVJ)"), new Text("sl"), new Text("0"), new Text("EmausBot"), new FloatWritable(1.0F), new FloatWritable(39.0F), new FloatWritable(39.0F), new FloatWritable(39.0F), new FloatWritable(0.0F) ]
      [ new TimestampWritable(new Timestamp(1356998400000L)), new Text("0"), new Text("article"), new Text("0"), new Text("0"), new Text("112_U.S._580"), new Text("en"), new Text("1"), new Text("MZMcBride"), new FloatWritable(1.0F), new FloatWritable(70.0F), new FloatWritable(70.0F), new FloatWritable(70.0F), new FloatWritable(0.0F) ]
      [ new TimestampWritable(new Timestamp(1356998400000L)), new Text("0"), new Text("article"), new Text("0"), new Text("0"), new Text("113_U.S._243"), new Text("en"), new Text("1"), new Text("MZMcBride"), new FloatWritable(1.0F), new FloatWritable(77.0F), new FloatWritable(77.0F), new FloatWritable(77.0F), new FloatWritable(0.0F) ]
      [ new TimestampWritable(new Timestamp(1356998400000L)), new Text("0"), new Text("article"), new Text("0"), new Text("0"), new Text("113_U.S._73"), new Text("en"), new Text("1"), new Text("MZMcBride"), new FloatWritable(1.0F), new FloatWritable(70.0F), new FloatWritable(70.0F), new FloatWritable(70.0F), new FloatWritable(0.0F) ]
      [ new TimestampWritable(new Timestamp(1356998400000L)), new Text("0"), new Text("article"), new Text("0"), new Text("0"), new Text("113_U.S._756"), new Text("en"), new Text("1"), new Text("MZMcBride"), new FloatWritable(1.0F), new FloatWritable(68.0F), new FloatWritable(68.0F), new FloatWritable(68.0F), new FloatWritable(0.0F) ]
      

      Attachments

        Issue Links

          Activity

            People

              jcamacho Jesús Camacho Rodríguez
              jcamacho Jesús Camacho Rodríguez
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: