TabularEditor / TabularEditor3

Bug reports, feature requests, discussion and documentation for Tabular Editor 3 (commercial version).
61 stars 7 forks source link

Pasting an Import Table from another model might be blocked by invalid Query Group #1229

Open edhans opened 3 months ago

edhans commented 3 months ago

Description

If you copy a table from another model using TE/3, if there was a Query Group for the source model's partition but that query group doesn't exist in the current model, the model will not save. It returns an error that the Query Group doesn't exist.

Tabular Editor 3 Version

3.13

Screenshots

No response

Steps to Reproduce

  1. Create a table in Power BI Desktop where you can create "Query Groups" to store the table you are going to copy
  2. Copy that table using Tabular Editor 3
  3. Paste it in a new model (service) and save the model. It won't save.

Expected behavior

I would expect it to just save with no Query Group, which isn't required. You cannot blank out the Query Group field. The only workaround I have is to hit the dropdown for the Query Group name, select something, save the model, then you can blank out the Query Group and save again.

Crash Report

No response

Windows Version

10

otykier commented 3 months ago

Good find, that's definitely a bug! But it begs the question:

As for workarounds, you write:

You cannot blank out the Query Group field

Did you try right-clicking and choosing "Reset"?

image

If this doesn't work, an alternative workaround, is to temporarily paste into a text editor. Then, locate the JSON that specifies the query group of the partition and remove that line:

image

Then, copy the whole thing from the text editor, and paste into TE3 again.

edhans commented 2 months ago

I did not try the right-click and reset. Didn't think to, and that might work. I will try that.

As for what TE should do - create the query group or blank it out, it should blank it out. If it doesn't exist, I don't think we want arbitrary query groups from other models pasted in with the underlying table.

This will be more relevant when Shared Expressions are actually stored in query groups. {hint hint 😉}