Articles for the Month of September 2016

Event Hub Troubleshooting

When creating an Azure Event Hub, chances are there will be no errors. This is not always a good thing, as it may mean that the errors exist but do not appear. Maybe the event hub is sending data, but the data cannot be read by a stream analytics job. Maybe the event hub really is working, but nothing appears in the dashboard. If any of these problems sound familiar, this post should help.

Testing the Event Hub

If you don’t have a source of data, like a raspberry pi or a sensor sending data, you can use this guide to create a C# program to send data to your event hub. Chances are though, this code is going to have to be modified even more than the instructions indicate, because the data sent is not in JSON. While it is not a requirement that data sent to the event hub be in JSON, if you want to read it with stream analytics that is one of the acceptable formats needed. If you are using the code provided and you want to insert a record into a database field input01, the message needs to be changed to the following to add the double-quotes and brackets required by JSON.
var message = "{'input01':\"" + Guid.NewGuid().ToString()   + "\"}";

Validating the Event Hubs Receive Messages

To ensure that the event hub is actually receiving data, validation can only be done in the old Azure portal. The service bus icon is two down from the HDInsight elephant. Double-clicking on the service bus namespace will bring up the a list of event hubs. Double-clicking on that will show this screen. This screen picture was taken roughly at 7:10. How many messages are there at 7:00? None.

eventhubbefore

This screen print was taken at 7:17. Notice anything different about the message count at 7:00?

eventhubafter

Oh look, there are 144 Messages which came in between 7:00 and 7:05. This means that everything really was working, I just needed to wait to see them appear. The wait time tends to vary from 10-20 minutes. Perhaps nothing is wrong. Lucky if this is you as you can stop reading

Stream Analytics with Event Hubs

If you are using an event hub to pass data to a stream analytics job, step one, make sure the stream analytics job is started. Created does not mean started as it should say Running as shown in the clip below.

The input for this stream is set to an event hub which has a standard subscription. The basic subscription, which is of course cheaper, has one default consumer group. With a standard subscription multiple consumer groups can be created and more importantly named. When setting up the inputs there is a blank for the name of the consumer group. If you have a basic subscription this will be empty. If it is empty, then the event hub won’t pass data to the stream analytics job. Perhaps there is a way to get a basic event hub to work with a stream analytics job, but I couldn’t make it happen. When I created an event hub with a standard subscription and created a consumer group and added that name to the input of a streaming analytics job, it worked.

If you have found these troubleshooting tips helpful, please subscribe to my blog, as I will be passing along more tips in my next post which will detail the steps of how to get data from the event hub to a Azure Database.

 

Yours Always

Ginger Grant

Data aficionado et SQL Raconteur

 

 

Group Workspaces and File Sharing in Power BI

When working on Power BI Reports, much of the time the task is spread among multiple people. If this is the case, you probably will also want to provide limited access to the PBIX files used in your Power BI reports. It would also be nice to have the ability to check out a file to insure that one person doesn’t over-write the changes of someone else. It would be nice to track changes that have been made to the files too. Based on this description, it may sound like the next topic will be implementing source control software, like TFS or Subversion. Instead, all you need to do is use the Group Workspaces functionality with Power BI.

Report Development Teams needs Power BI Group Workspaces

Power BI is licensed by the individual. This means Power BI reports created within a My Workspace belong to that person. This can be a problem if say that person goes on vacation or quits. If the reports are all contained within one person’s account and that individual’s account is deleted when they separate from the company, what do you think happen to all of the reports? Answer they are gone too. Maybe a call to Microsoft Power BI Support will be able to help if that occurs, or maybe not. It’s would be better to create the ability within the Power BI environment where the company owns the company reports. Even if the Power BI reports are all created by one person, I would create a workgroup. After all that one person might want to go on vacation sometime, and for disaster recovery reasons someone else needs to be able to access the reports Of course by that I mean, create a Workspace within Power BI, and add other people to it. When you create a workspace within Power BI, not only do you get a location where multiple people can visualize the same reports, a Group One Drive is also created where PBIX files can be shared within the group.

Source Control with Power BI Reports

PowerBIGroupWorkSpaceMany of the functionality people associate with source control programs live inside the group one drive which is created for Power BI. Looking at the picture of the group screen, which was created when a Power BI Workspace was created, you will see that this group contains 7 members and four files. The members of this groups are the only ones who have access to the files. The file AcmeThree.pbix is selected, and clicking on the ellipse(…) brings up a menu for the file. Notice one of them is Check Out. If I check out a file, the icon next to the name changes, providing a visual queue to all who wish to edit the file that it is being working on. The menu option for me would change to Check In, providing the ability to check the file in to the directory, allowing others to check out the file and work on it. Notice Version History also exists. This feature allows previous versions of the file to be loaded, which means that changes made to a file can be rolled back.

Using One Drive with Workgroups provides a convenient way for groups of users to work on reports, ensuring that the reports are stored in a secure location and can be access by multiple people within the organization. If you are looking for way for a team of people to collaboratively work on reports, create a Group Workspace in Power BI then use the One Group functionality to provide a secure method for report development.

 

Yours Always

Ginger Grant

Data aficionado et SQL Raconteur