CKAN: Unable to select the appropriate DataStore columns for the axis of a graph-based view

150 views Asked by At

Let's say I have the following resource in demo.ckan.org:

http://demo.ckan.org/dataset/sc_malaga_traffic/resource/a43bfb04-7a8b-4624-a06a-25f4165e5b2f

If I try to create a view, I've found that I'm unable to select the desired columns both for the Axis 1 and 2. Only "_id", "recvTime" and "rectTimeTs" are available:

enter image description here

enter image description here

I would like to use "attrValue" as the column for Axis 2.

Maybe I'm not understanding well how the views work, so an explanation will be appreciated :)

1

There are 1 answers

0
Matt Fullerton On

There are two "fixes"; neither are particularly nice:

  1. Apply this change/commit to your CKAN source: https://github.com/smartlane/ckan/commit/9a72192e8e108a408124c36e58ad48fd09f0dd6f
  2. Create your view with any old axis 1 and axis 2 (even though these aren't the variables you want). Connect to the CKAN database and go to the resource_view table, find the row with id of the view you just created (click through to it in CKAN and you'll see it at the end of the URL). Edit the "config" column - it is text in JSON format. Set series and group to the actual attributes/column names of the data that you want instead of the dummy ones you entered.