Localizing the Data Model – Part 4


Introduction

Ever since Part 1 of this series, @Mike_Carlo and the other fine folks at powerbi.tips had mentioned that this tool called Metadata Translator by Kay Unkroth was the bees knees when it came to localizing your Power BI data model. What I read about this tool seemed unbelievably awesome. And then I tried to get it to actually work. Oh, the struggles!!

 

First Attempt

For my first attempt at making Metadata Translator work, I wasn’t super thrilled about compiling the executable myself so I downloaded powerbi.tips free Business Ops software, which makes it dirt simple to get a large variety of Power BI external tools installed. Got it installed and was able to launch it from the External Tools ribbon but every time I hit Translate, the thing just evaporated. As in just immediately closed.

 

And yes, I went out to the Azure portal and provisioned myself a Translator service. In fact, the exact steps to do that are:

  1. Go to portal.azure.com
  2. Click Create a resource
  3. Search for Translator
  4. In the Translator box, click Create and then Translator
  5. Fill in the relavent info, choose the Free pricing tier and Review + create

 

Bingo, bango, bongo you have yourself a Translator service. Anyway, more on that later. Short story, I eventually got tired of Metadata Translator just unceremoniously exiting on me and just gave up on it. 

 

Second Attempt

After I finished Part 2 and Part 3 I figured I was pretty well done with the series and went on to do some other things like translating Northings and Eastings into Latitude and Longitude as well as my baby, Bride of Cthulhu! But then I noticed that there was a new version of Business Ops out on powerbi.tips and there was a specific mention of some sort of update to Metadata Translator. What they hay, might was well give it another shot! Future me now wants to kick the crap out of past me for that decision, but lo and behold, after some mighty struggles I actually got the thing to work.

 

For once in my life, I actually read the instructions. I dutifully uninstalled the old version. I then downloaded and installed the new version. I removed Metadata Translator. I added Metadata Translator. And…fail! Every time I clicked the button for Metadata Translator, I was informed that the executable did not even exist. Great, took all that time and care and managed to take a giant leap backward. And hence why it is generally useless to read the manual.

 

But, here is where being an old school command-line kind of guy comes in handy. Troubleshooting. First, figured out where they were keeping the good old Metadata Translator executable.

  1. cmd
  2. cd \
  3. dir metadat*.exe /s

OK, there it is, “C:\Program Files\PowerBI.tips Business Ops\resources\static\external-tools\010__Kay_Unkroth\MetadataTranslator\app“. Spiffy. And the executable is “Metadata Translator.exe“. Opened a few config and json files in Notepad but nothing relevant. Some references to “__TOOL_INSTALL_DIR__” but nothing that actually specified that path.

 

Time to look somewhere else. After a bit of research, figured out that the configuration for external tools for Power BI are stored in “C:\Program Files (x86)\Common Files\Microsoft Shared\Power BI Desktop\External Tools“. In that directory is a file, “035-metadata-translator.pbitool.json“. Let’s open up that bad boy in Notepad. Oh, there’s a path line in there:

 

“path”: “C:\\Program Files\\PowerBI.tips Business Ops\\resources\\static\\external-tools\\010__Kay_Unkroth\\MetadataTranslator\\app\\MetadataTranslator.exe”

 

Wait a minute, one of these things is not like the other! The actual file name has a space in it! Quick edit to the json file to add a space, relaunch Power BI Desktop and presto! We are in business! Let’s configure the Settings and click that Translate button!! And…exit. Ahhhhhhhhh!!!!!

 

So, here is what you need to know about configuring the Metadata Translator. For the settings shown below:

Greg_Deckler_0-1632424936282.png

This is what you DON’T want:

Greg_Deckler_1-1632425162038.png

Instead, under Resources, you want to click the name of your Translator resource. I came up with the inventive name of gregdeckler for my resource. You click that and then you click “Click here to manage keys“:

Greg_Deckler_3-1632425388408.png

And here is what you want for those values in Metadata Translator:

Greg_Deckler_4-1632425565150.png

Once you have Metadata Translator configured correctly, it’s smooth sailing! You pick your languages and click Translate:

Greg_Deckler_5-1632425678465.png

Click Apply and the translations are written to your data model, which you can prove to yourself by opening up Tabular Editor (the free one):

Greg_Deckler_6-1632425826427.png

 

Conclusion

Greg is a bonehead who does bonehead things that inflict great personal pain and suffering. Metadata Translator makes localization of the data model a snap!



Source link

Be the first to comment

Leave a Reply

Your email address will not be published.


*