Question

Error when extending view dimension with links

  • 22 March 2019
  • 6 replies
  • 194 views

Userlevel 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?


6 replies

Userlevel 7
Badge +1

Totally agree re: an improved error message. It looks like we’ve decided internally that this is something to fix (not just improve the error message) but I don’t have a clear timeline on it.


Thanks for dropping in some more feedback! I’ll keep updating here.

Hi there,

I also faced this issue today and it wasn’t overly clear from the error message what I’d done wrong initially.


I too wanted the links to append to the existing ones defined in the base view, however I can see why the behaviour would be undefined with the current attribute - overwrite or append. At the very least it would be nice to get a better error message - perhaps pointing to both the base and extended views?

Userlevel 1

Great, thanks!

Userlevel 7
Badge +1

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.

Userlevel 1

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.

Userlevel 7
Badge +1

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.

Reply