PascalCase Reading exercises for MicrosoftFabric
By Rob Litjens
Camel C(h)asing?
Last Friday I was finding out how to get the API builder installed. That was for a non programmer not that easy, but there is plenty of documentation on Microsoft Learn which is usefull.
Today, I will try to build the connection to my SQL Instance which is running on premise in a VM. My NUC can do this.. It is awesome to get this done.
Since I do not know what or where it should run, I just opened VSCode and start to write a Powershell like thing because I know I have to repeat some of this stuff sooner or later.
The first step after installing the software is to start a configuration. Data API Builder can handle more than one configuration. How that works will come clear in the near future. For now, I have setup a configuration for a Development environment. Because it is the only configuration at this moment only on dab-config.json is created.
When the json file is there, you can start dab by
dab start
A lot of noise will appear on your screen:
If you look carefully in the noise, you will find a possibility on how you can use your API
But.. I do have a config file, but no API yet. I need to add at least acces to some tables to test despite you as a DBA dont want to give read or even write access to the table itself. One would use Stored Procedures for that.
For the test I will add a connection to a table and see if that works. Where you think that will be difficult… It is not that hard…:
dab add productionproducts –source production.products — permissions “anonymous:*”
The output tells someting that should make your life easier:
Lets test something…
Hmm. It does not connect in any way. Lets look at the VM. THere is no inbound Firewall Rule for 1433. So lets create that..
Using test-netconnection in powershell from my NUC to the VM still fails. There must be something else… You know, if it ain’t DNS it is firewalls. So open the firewall for the standard port and try again…
crash…
Why? Why? Why? Lets read a bit through the server. SQl errorlogs…
Login failed for user ”. Reason: Failed to open the explicitly specified database ‘BikeStore_2019’. \[CLIENT: 256.268.301.499\]
Hang on… BikeStore_2019? Shouldn’t that be plural… YES. Reading is difficult :)
Easily fix that in your dab-config.json is easy. Done.
DAB start does not return errors..
Lets open an API:
Next item to look at: how can the API’s be exposed. Another thing we need to look at: security