Open lakviat opened 2 years ago
Hi @lakviat In your example, you're using TabularEditor3.exe. This executable does not have a CLI. You should use the .exe from Tabular Editor 2.x instead.
Thanks getting back to me @otykier
I tried with the version 2 but that didn't work for me, am I missing something ?
command that I'm running :
start /wait "& ""C:\Program Files (x86)\Tabular Editor\TabularEditor.exe"" ""$powerbi://api.powerbi.com"" ""$DB_ID_Number"" -F ""$C:\Users\user_name\Folder"" "
I would appreciate the help here
What error message are you getting?
@otykier Basically nothing, it opens another CMD terminal and that's it
Okay, I suggest you try to run the command on your local machine in a Windows Command Prompt, to better see what’s going on, before implementing it in a CI/CD pipeline.
@otykier I'm actually running it locally, I have not implemented it in the CI CD yet
Try to run it without start /wait
. It’s difficult to know whats going on if you’re not getting any output.
@otykier now I'm getting the message
The filename, directory name, or volume label syntax is incorrect (The directory is present thought)
The command I ran
"& ""C:\Program Files (x86)\Tabular Editor\TabularEditor.exe"" ""$powerbi://api.powerbi.com"" ""$DB_NAME"" -F ""$C:\Users\user_name\BigTest"" "
That error message does not originate from Tabular Editor. Let's start over. Here's what I do:
"c:\Program Files (x86)\Tabular Editor\TabularEditor.exe" "localhost" "AdventureWorks" -F "c:\Users\DanielOtykier\Desktop\TestOutputModel"
Here, you would need to replace localhost
with the full connection string to the Power BI workspace, including your Service Principal credentials, there's an example here. AdventureWorks
is the name of the dataset to load. You should see something like this to indicate that TabularEditor.exe is actually running:
Hi @otykier I was able to generate database.json but I need to extract full set of folders from the model Tried to use serialize options from #652 but that isn't working for me
is there anything I'm missing here ?
"C:\Program Files (x86)\Tabular Editor\TabularEditor.exe" "DataSource=powerbi://api.powerbi.com/;User ID=app:XXXX@XXXX;Password=XXXX" "Labour DEV" "Model.SetAnnotation("TabularEditor_SerializeOptions", ReadFile("C:\Users\nmirovich\TabularEditor_SerializeOptions.json"));" -S "ApplySerializeOptionsAnnotation.csx" -F "C:\Users\nmirovich\BigTest"
I also tried to set the annotations first using Model.SetAnnotation, that didn't work either
"C:\Program Files (x86)\Tabular Editor\TabularEditor.exe" "Model.SetAnnotation("TabularEditor_SerializeOptions", ReadFile("C:\Users\nmirovich\TabularEditor_SerializeOptions.json"));"
Hi @lakviat
If you used the ApplySerializeOptionsAnnotation.csx script from #652, you must make sure that the .json file is located in the same folder as your current directory, or fix the path used in the script. Within a script, remember that you have to escape \
characters in strings by typing them twice: \\
.
But instead of using the script, I recommend setting the annotation through Tabular Editor's UI. You only need to do this once:
The next time you use the CLI, you can then simply do this:
"C:\Program Files (x86)\Tabular Editor\TabularEditor.exe" "DataSource=powerbi://api.powerbi.com/;User ID=app:XXXX@XXXX;Password=XXXX" "Labour DEV" -F "C:\Users\nmirovich\BigTest"
Thanks for the help @otykier
Just to let know "Provider=MSOLAP; was missing from the command for that reason it was not generating folders
works now
Hi @otykier quick question, have you solved the problem of programmatically downloading the .pbix files from power bi to your CI CD server by any chance ? if so can you share some insights that worked best for you ?
Hi there.
I'm trying to download all .json measures from the Tabular Editor that reads from power bi (.pbix file) I need to integrate this with CLI so that I can run in CI/CD
The previous issues raised here didn't work for me ( I did researches before raising issue) ''' $cmd = "& ""C:\Program Files (x86)\Tabular Editor\TabularEditor.exe"" ""$Server"" ""$DatabaseName"" -F ""$ModelFolderPath"" " '''
This is the command I came up with :
start "& ""C:\Program Files\Tabular Editor 3\TabularEditor3.exe"" ""$https://dbname.com"" ""$ENTERPRISE_DB"" -F ""$C:\Users\Test"" "
Basically I need to extract all measure .json files from the Tabular Editor from the CLI but none of the options worked for me
I would appreciate the help !