HTTP 302 error while adding new columns to datasource

6 views
Skip to first unread message

Jagadeesh Motamarri

unread,
May 22, 2016, 5:18:25 PM5/22/16
to airbnb_caravel
I am trying to add new columns to the existing datasource in druid and I see HTTP 302 error - 

"POST /druidcolumninlineview/add/?_flt_0_datasource=4 HTTP/1.1" 302

Also, no columns are getting created.

Any ideas?

Jagadeesh Motamarri

unread,
May 22, 2016, 5:20:13 PM5/22/16
to airbnb_caravel
Also, it is strange to see that request payload is something like below (captured from chrome dev tool bar)
  1. ------WebKitFormBoundaryVBFAz0lgLEMnxwgA Content-Disposition: form-data; name="csrf_token" 1463955153##2e9be562d99a58e6d8ea012d7a3be6a250c0d7a7 ------WebKitFormBoundaryVBFAz0lgLEMnxwgA Content-Disposition: form-data; name="description" REQUEST_NAME ------WebKitFormBoundaryVBFAz0lgLEMnxwgA Content-Disposition: form-data; name="filterable" y ------WebKitFormBoundaryVBFAz0lgLEMnxwgA Content-Disposition: form-data; name="changed_by" __None ------WebKitFormBoundaryVBFAz0lgLEMnxwgA Content-Disposition: form-data; name="is_active" y ------WebKitFormBoundaryVBFAz0lgLEMnxwgA Content-Disposition: form-data; name="created_by" 1 ------WebKitFormBoundaryVBFAz0lgLEMnxwgA Content-Disposition: form-data; name="groupby" y ------WebKitFormBoundaryVBFAz0lgLEMnxwgA Content-Disposition: form-data; name="created_on" 2016-05-22 17:12:33.119721 ------WebKitFormBoundaryVBFAz0lgLEMnxwgA Content-Disposition: form-data; name="datasource" 4 ------WebKitFormBoundaryVBFAz0lgLEMnxwgA Content-Disposition: form-data; name="type" ------WebKitFormBoundaryVBFAz0lgLEMnxwgA Content-Disposition: form-data; name="changed_on" 2016-05-22 17:12:33.119763 ------WebKitFormBoundaryVBFAz0lgLEMnxwgA Content-Disposition: form-data; name="column_name" REQUEST_NAME ------WebKitFormBoundaryVBFAz0lgLEMnxwgA--
Thanks!

Ian S

unread,
May 23, 2016, 1:44:22 PM5/23/16
to airbnb_caravel
Hey Jagadeesh,

I run into the same problem. Metrics can be added manually, but columns (dimensions) failed with 302 errors. Which version of Druid and Caravel are you using?

Jagadeesh Motamarri

unread,
May 23, 2016, 5:23:49 PM5/23/16
to airbnb_caravel
I started off with Druid 0.9 and Caravel 0.8.9.

Refreshed datasources from Caravel - which pulled both dimensions and metrics (well, most of them)

And then upgraded to Caravel 0.9.

Queries seem to work, and I am able to edit the datasources now.

Weird on the flow, but working for now..lol

Ian S

unread,
May 23, 2016, 7:35:58 PM5/23/16
to airbnb_caravel
Which version of Python are you using? I tried 0.8.9 with Druid 0.9.0, and no dimensions or metrics were pulled. Do you mind try the ingestion spec I have and see whether your set-up works? Thanks a lot.

{
   "dataSources" : [
      {
         "spec" : {
            "dataSchema" : {
               "granularitySpec" : {
                  "queryGranularity" : "none",
                  "type" : "uniform",
                  "segmentGranularity" : "hour"
               },
               "dataSource" : "flight",
               "parser" : {
                  "type" : "string",
                  "parseSpec" : {
                     "timestampSpec" : {
                        "format" : "auto",
                        "column" : "timestamp"
                     },
                     "format" : "json",
                     "dimensionsSpec" : {
                        "dimensions" : [
                           "airline",
                           "fare",
                           "from",
                           "to",
                           "date"
                        ]
                     }
                  }
               },
               "metricsSpec" : [
                  {
                     "type" : "count",
                     "name" : "count"
                  },
                  {
                     "type" : "doubleMin",
                     "name" : "lowest_price",
                     "fieldName" : "fare"
                  }
               ]
            },
            "tuningConfig" : {
               "type" : "realtime",
               "intermediatePersistPeriod" : "PT3M",
               "windowPeriod" : "PT10M",
               "maxRowsInMemory" : 75000
            }
         },
         "properties" : {
            "task.partitions" : "1",
            "task.replicants" : "1"
         }
      }
   ],
   "properties" : {
      "zookeeper.connect" : "<zookeeper_ip>:2181",
      "http.port" : "8200",
      "http.threads" : "40"
   }
}
Reply all
Reply to author
Forward
0 new messages