cubiql icon indicating copy to clipboard operation
cubiql copied to clipboard

Allow access to arbitrary slices without using dataset specific schemas

Open RickMoynihan opened this issue 6 years ago • 3 comments

Use case is to provide a more abstract schema that allows querying for slices without requiring specific dataset_ schema knowledge.

An example query might be:

{
  datasets(uri: "http://dataset") {
    uri
    label
    observations(order_uri: {uri: "http://date-dim", direction: ASC}, locked_dims: {dim_uri: "http://dim/", dim_val: "http://dim-val"}) {
      page {
        result {
          uri
          label
          measures {
            uri
            label
            measure_value
          }
          components {
            uri
            label
            values {
              uri
              label
            }
          }
        }
      }
    }
  }
}

RickMoynihan avatar Apr 26 '18 10:04 RickMoynihan

Extracted this query example from discussion with @mohadelrezk in #84.

It would be good if @zeginis and @mohadelrezk could look at this too and see if there are any other options we'd need to support.

RickMoynihan avatar Apr 26 '18 11:04 RickMoynihan

what is 'locked_dims'? I was thinking of a simpler query and results as in here: https://github.com/OpenGovIntelligence/json-qb-api-implementation#get-slice

mohadelrezk avatar Jun 11 '18 14:06 mohadelrezk

@mohadelrezk locked_dims refers to the fixed values of dimensions e.g. year=2010 and gender=male At the old API this was refered as fixed dimensions.

At the simple query you are referring there is no need to define locked dimensions since you are requesting all the observations.

zeginis avatar Jun 11 '18 15:06 zeginis