-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON View? #69
Comments
Yes - other than the options mentioned, there is no way currently to directly edit the JSON metadata in Tabular Editor. I really like the idea of having a JSON tab next to the two current editor tabs. However, the main goal of Tabular Editor is to provide UI so that you don't need to edit the JSON manually. May I ask what specific need you have in this case? |
Well, originally I was looking for it to get around the bug with the Query property of a partition, but beyond that I would use it mostly for copying/pasting measures and tables within the model and between models. For example, I may end up making several measures that have almost identical DAX save for a tweak or two. I can copy/paste their names, DAX, display folder, and formatting strings all at once, then go back to each copy and make the tweak as necessary. Alternatively, since I work with several cubes that are all structured quite similarly, I find myself often copying and pasting measures and even tables between cubes. Basically it gives me the complete control that C# offers without having to learn C# 😄 Is there a way to do any of these things currently? I support the idea that the UI should replace the need to modify JSON. |
It seems that most of the functionality you need is already readily accessible through the UI - my apologies that features are not better documented than they are :-)
After some more thought, I realise that having a read/write JSON editor tab might not be feasible, as it will be difficult to track and react to changes made to the JSON. Instead, what I could do is provide an "Import object from JSON" option, that lets you import table objects or entire tables, by pasting in a piece of JSON representing the object. This would work similar to how the "Import translations" feature, but allow you to import more types of objects. Export to JSON, as you already know, is simply a matter of dragging the object into a text editor. Kindly let me know your thoughts on that. |
That sounds like an excellent idea. Thanks for the info! I'll try these features out next time. |
Release 2.6 will feature familiar cut/copy/paste operations directly in the Explorer Tree. Objects will be stored in the clipboard as JSON. This means you can select a number of objects in Tabular Editor, hit CTRL+X and paste into any text editor, manipulate the JSON however you want, then copy and hit CTRL+V back in Tabular Editor to insert the manipulated objects :-) |
hi , |
You can sort of already do this today. Try to copy a few measures from Tabular Editor into the clipboard. Then, paste the code into a text editor. As you can see, Tabular Editor simply uses the JSON definition of the measures, when copying them to the clipboard. So you can do the reverse as well: Generate the JSON in Excel, copy the JSON into the clipboard and then pasting into Tabular Editor. |
Hi Daniel,
thanks a lot for your quick answer!
What I mean though, is that you Keep the Connection with Power BI and also expose the json Code behind the model (tables , Relations measueres etc)
There I can inject my Code , and bring it back to Tab Editor and then deployed to the connected Power BI or to a Server
In any Case keep on the great Job!!
Best
Sakis
Am 26.03.2021 um 16:46 schrieb Daniel Otykier ***@***.***>:
You can sort of already do this today. Try to copy a few measures from Tabular Editor into the clipboard. Then, paste the code into a text editor. As you can see, Tabular Editor simply uses the JSON definition of the measures, when copying them to the clipboard. So you can do the reverse as well: Generate the JSON in Excel, copy the JSON into the clipboard and then pasting into Tabular Editor.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#69 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AENEZEZAAT7AOZMB7DHDNLDTFST45ANCNFSM4DQLRUOA>.
|
@logik360 the problem with allowing import of arbitrary TOM/JSON is that it doesn't always play well with the metadata that is already loaded into memory. But the good news is that Tabular Editor provides many other options for working with the metadata programatically. For example, a common scenario is to use scripting to import measures in batches. Here's an article that illustrates one way to do this: https://docs.tabulareditor.com/Useful-script-snippets.html#generating-measures-from-a-file |
Thanks Daniel,
And again ... keep on downing this great job from which we are all profiting
Best
Sakis
Am 28.03.2021 um 11:23 schrieb Daniel Otykier ***@***.***>:
@logik360<https://github.com/logik360> the problem with allowing import of arbitrary JSON is that it can break certain other functionality in Tabular Editor. There are likely better ways to achieve the same result.
For example, a common scenario is to use scripting to import measures in batches. Here's an article that illustrates one way to do this: https://docs.tabulareditor.com/Useful-script-snippets.html#generating-measures-from-a-file
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#69 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AENEZEYE66LLX6PQHSLWLJTTF37SFANCNFSM4DQLRUOA>.
|
It would be nice if there was a way to scroll through and edit the JSON for the model and/or a particular object.
To my knowledge, if I want to edit JSON directly, I would have to:
a. Either by dragging an object into a text editor and saving it as a .json file
b. Or by using "Export translations...", which is always grayed out no matter what I try
Is that correct?
If so, I think it would be useful to have another view next to "DAX Editor" and "Advanced Scripting" that was for editing JSON. Let me know your thoughts!
The text was updated successfully, but these errors were encountered: