- Description
- Requirements
- Setup
- Manual Refresh Instructions
- (TBC) Automatic Script Refresh Instructions
Guide for Okebet to refresh PowerBI data.
- Windows OS to install the PowerBI on-premises data gateway
okebet-replication.pem
ssh key (stored in Okebet PowerBI Refresh Data folder)
- Python
- For Windows, you can install Python from Python Releases for Windows
- .env file (stored in Okebet PowerBI Refresh Data folder)
All instructions within this Setup section are required regardless of if you're performing manual refreshes or using the scripts.
Download Data Gateway and install.
Install the data gateway by signing into your Okebet Microsoft Power BI account.
Create a new on-premises data gateway, it will ask you for a gateway name and some other information.
Check to see if it's working by going here:
Your gateway will appear as Online while your computer is on, meaning it's working and we can refresh the data.
Open the settings panel for the gateway and activate the options under General and PowerBI
While still in Manage Connections and Gateways go to the 'Connections' tab and click 'New' in the top left corner.
Set up a new On-premises connection using the Gateway cluster name you created when setting up the gateway.
Name the connection and set the Connection type to MySQL.
Now fill out the following information in the remaining fields
Server: localhost:3309
Database: bi
Authentication method: Basic
Username: reporting
Password: OnAreCleTION
Encrypted connection: Not encrypted
Privacy level: Organizational
When you click Create it will test the connection and ensure the details and password are correct.
Now we need to connect the data to our semantic model.
Head back to the home page on PowerBI and search for Okebet Reporting, find the one that's Type Semantic Model and click it.
Within the semantic model click File > Settings:
Now expand the "Gateway and cloud connections" dropdown and you'll see some information about the data sources included in the semantic model. We want to map the MySQL server to the Connection we created earlier, which we called bm. Once you map it correctly it will look like this:
Maps to: bm
Click Apply to save the settings.
For our refresh to work we have to be connected to the ssh tunnel provided by BetMakers.
The following instructions are specifically for Windows PCs because you must open the ssh tunnel on the PC where you installed the on-premises gateway.
Take the private key certificate provided (okebet-replication.pem) and place it somewhere easily accessible e.g. your desktop.
Now we need to run a terminal command that uses this certificate.
The easiest way to do this if you're unfamiliar with how terminals work is to ensure you have Windows' new 'Terminal' program, which provides a handy right click option.
Right click your desktop (or any folder where you placed the certificate) and select 'Open in Terminal'. If you don't see this option I recommend just heading to the Microsoft Store on your PC and installing it.
Once the Terminal opens you'll see it opens to wherever you right clicked from:
We can make sure of this by running the 'ls' command (meaning list) which will display all the contents of the folder that the terminal is in. We can see the certificate file when running the list command on the Desktop:
Now we can run the ssh command to connect. Copy this and run it.
ssh -i okebet-replication.pem [email protected] -L 3309:replicated-db-api.okebet.com.au:3306 -N
If it's the first time you've run it you may see a security prompt that requires you to type 'yes'.
Once run successfully you'll see it look like this, with a simple blinking cursor:
Now that the ssh is connected let's head back to PowerBI online and try to refresh the data. (The refresh can be performed from any computer as long as the Windows machine with the gateway installed is connected to the ssh tunnel)
Back on the Okebet Reporting settings page we were on earlier. Let's click Refresh > Refresh now:
You'll see a small animated circle indicating the refresh is taking place.
For more information about the refresh you can head to Refresh > Refresh history and see the following screen showing how we have a refresh currently in progress and all the past refreshes completed. Detailed error messages may also appear here if things go wrong.
In my experience, the refresh should take approximately 6-8 mins.
Once the refresh finishes the small animated circle will stop spinning. If you refresh the settings page you'll see the time of the last refresh has updated:
Inside the history we can also see that it's completed and it took about 6 minutes:
We're done! That's how you can perform a manual refresh of the dataset.
To be completed.