Error when extending view dimension with links

bug
file
done
normal_priority
(Steve Dodd) #1

Having trouble adding on extra links to a derived view’s dimension.

Here’s an example:

view: base {
  dimension: some_dimension {
    link: {
      label: "Base"
    }
  }
}

view: derived {
  extends: [base]
  dimension: some_dimension {
    link: {
      label: "Derived"
    }
  }
}

If you validate that, you end up with an error like this:

Cannot extends "key" property of "view.fields.some_dimension" due to mis-matched property values.

Any idea how to add on extra links to an extended view’s dimension?

0 Likes

(Izzy) #2

Steve, you’re on an absolute tear today!

This is true, you’re not doing anything wrong. If you extend a dimension that has a link parameter in the base view, you’ll get that error.

If your base view is extension: required then you can simply not have the link in the base view, and you’re alright. If not, then you could add a hidden: yes in the extended view field and then create a new date dimension that was essentially the same as the original field (minus the link ).(Plagiarized shamelessly from @Ellio).

To help us out in making this work better, what functionality would you be looking for here—An overwrite or an append? We could keep adding to the list of links as we extend, or we could just overrule with whatever’s in the extended view, but until we decide on one of those, I think it’s going to stay like this, where you just can’t do it. Feedback would be great.

0 Likes

(Steve Dodd) #4

I’m looking for append.

I think append is also consistent with the fact that adding multiple links in the same dimension is an append operation.

If one wants to change a link, I’d suggest that one would include a link with exactly the same name, and that would augment the existing link via the usual rules.

If one wants to delete a link, perhaps a hidden property could be added.

I don’t need the latter two enhancements though, so just the simple append operation would suffice for now.

0 Likes

(Izzy) #5

Just making sure I close the loop here (at least temporarily). I’ve surfaced that feedback, and I’ll post here with any updates if they come down the pipeline.

0 Likes

(Steve Dodd) #6

Great, thanks!

0 Likes