Monthly Archives: January 2018

Setting up the gateway

Sometimes, a seemingly simple task leads to a whole lot of activities.  I did not mean to install the gateway today.. But I wanted to try machine learning studio, and, then, I found that I can use on-premise gateway to import data for the experiments. So, having considered the alternatives, I figured it might make sense to actually get the gateway installed first. Especially since it’s Friday night, and there is a whole weekend ahead.

The whole procedure of installing the gateway looks simple and it is described here:

https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-gateway-install#download

But, to start with, if you look at the recommended configuration there, you can’t help but think that there is nothing simple these days since 8 core CPU & Windows 2012 goes a little beyond my laptop capabilities. Although, it does meet the minimum requirements, so it should work.

That’s the line of thought I was following when I started the installer and got the message below:

image

That makes sense, of course.. but, on the other hand,  that’s just obvious.

It did not take long to arrive at the screen below:

image

So I tried my personal account for which I have Azure subscription.. Did not work right away:

image

“This does not look like a work or school email. You can’t sign in here with a personal account. Use your work or school account instead.”

For this, there is a solution:

https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-howto-tenant

I did not have any other domain names there, but it turned out there is a default domain name – you can find it under “custom domain names” in the “Azure Active Directory”:

image

So.. Created a user in that domain:

image

Now I logged out of the azure portal, and logged in under that new account. Had to change the password along the way.. And, then, I used that new account for the gateway:

image

Registering the gateway:

image

And, then, creating a gateway in Azure:

image

Actually, before I was able to proceed, I had to add my new admin user to the subscriptions.. Well, that’s been done, so here we go, I clicked “Create a gateway in Azure” on the screenshot above.. only to find out that no installed instances were found for the current user:

image

Wellll.. Changing location to Canada Central (where the gateway is registered), and now I see my gateway in the “installation name” dropdown:

image

Actually, the interesting part is.. Gateway installations seem to be “per user”. I did not arrive at the screenshot above right away – first, I somehow managed to login to azure portal under my personal account, and, for that account, there were no “installations” at all. Took me a little while to figure out that I actually had to log in under the same user account which I used for the local installation (and, then, also had to choose the correct location).

So.. how do I add this thing to the machine learning? Will try that in the next post.

V9: Checking string fields for null

It seems there is an unexpected change in how V9 (specifically, 9.0.0.3172) is treating string fields on the SDK side.

Normally, if you clear a field, you can use this code in the plugin to see if the field is being cleared:

            if (entity.Contains(“ita_integer”) && entity[“ita_integer”] == null)
             {
                 throw new InvalidPluginExecutionException(“Integer is null”);
             }

For example:

image

image

image

It does not seem to be the case for text fields anymore.

Below I have exactly the same code but for a text field this time:

            if (entity.Contains(“ita_notestallowedmessage”) && entity[“ita_notestallowedmessage”] == null)
             {
                 throw new InvalidPluginExecutionException(“No Test Allowed Message is null”);
             }

And it allows me to save the data just fine:

image

image

Although, if I query all the records where that field does not contain data, the record will come up.

So, for whatever reason, in this version of V9 I have to re-write that code for string fields like this:

if (entity.Contains(“ita_notestallowedmessage”) && (entity[“ita_notestallowedmessage”] == null || (string)entity[“ita_notestallowedmessage”] == “”))
             {
                 throw new InvalidPluginExecutionException(“Integer is null”);
             }

Then it works.. Something to keep in mind.