Having developed Node and Edge/ Dynamic connector masters shapes for creating Node and Edge table entries for a SQL Server 2017, I decided that I should write some validation rules. The validation feature has been in Visio since the 2010 edition, but is underused, even though I wrote a book about them … see Microsoft Visio 2013 Business Process Diagramming and Validation . I think that only six rules are necessary to validate that a page with Node and Edge shapes is well constructed before attempting to update the tables in SQL Server, or any other GraphDatabase.
bVisual Blog by David Parker
Using JSON text in Visio shapes
I often create Visio masters with a fixed number of Shape Data rows, and sometimes I get requests to modify them because of changes in business needs. Well, my previous posts about Graph Databases got me thinking if it would be possible to embed JSON text in Visio shapes in some sort of meaningful way. Then the user could enter just attribute-value pairs at will, without the need for me to modify their master shape. Alternatively, the data could be inserted into the shape from a database, such as SQL server. So, in this article I discuss the suitability of JSON text in Visio shapes.
[Read more…] about Using JSON text in Visio shapesUsing Visio and PowerBI with GraphDatabase in SQLServer – Part 2
In my last article, I described how Visio can be used to input Nodes & Edges into a SQL Server graph tables (see Using #Visio and #PowerBI with #GraphDatabase in #SQLServer). In this article, I show how PowerBI can be used to create an Excel table that can then be used to automatically create a Visio diagram. This diagram can then be enhanced for reports and presentations, or used to check the validity of nodes and relationships. The shapes can then be used to update or delete edges and nodes in the database.
Using Visio and PowerBI with GraphDatabase in SQLServer
I went to a very interesting inaugural meeting of the South East UK Power BI Group last week. Whilst the presentation by Dr. Subramani Paramasivam was impressive for its ambition, it was the presentation by Andrew Fryer of Microsoft that particularly intrigued me. He introduced us to the world of Graph Databases, such as Neo4J and CosmosDB, but also demonstrated SQL Server 2017’s new Graph table types, called Node and Edge. He used the latter because solution because he could use example in Power BI using the Force-Directed visual. Well, this SQL Server feature was new to me, and so I was inspired to see if I could use my favourite tool, Visio, to input data into a graph database, and to selectively display parts.
This is something that I have often grappled with because, great as Visio is for diagramming, it is not the answer in all situations. It is brilliant at connecting shapes together, and adding data to each shape, including the connector, but it would not be fantastic at displaying all the millions of data points and relationships in any graph database worth its salt. However, what if another application, such as PowerBI, could be used to analyse and filter the information down to a more manageable scale, and then export the filtered data set to Visio where it can display the relationships, and be enhanced for inclusion in reports? Although I really like PowerBI, I do not think it generally provides an output that is report quality. Especially when reviewing the links between many nodes.
It is possible to insert data into SQL Server graph tables from csv files, but this is not always the most intuitive manner. Indeed, Andrew Fryer, whom I know to be a brilliant artist, resorts to sketching relationships freehand, and then creates tables or scripts from the diagram manually. So, what if you can use Visio to drag and drop nodes, and connect relationships between them, adding names and properties on the fly, as you go? Then, what if you could review your diagram, and then upload all of the nodes and edges to the database automatically? This process could be repeated on many pages, so that the data gets merged together in the graph database. The Visio pages can also be saved and remain available as a record of input, should any questions arise.
These new graph tables contain special column types that cannot be used directly by either PowerBI or Visio, so it is necessary to create views of the tables, thus effectively hiding them. I have a slight issue with the graphdemo database in the Microsoft article because it has extra columns on some Node and Edge tables. To me, this seems a little impure, and I think that the Node tables should only have an ID, Name and Properties column in addition to the Node columns, and the Edge tables should only have a Properties column in addition to the Edge columns. Ideally, the Properties columns in both tables should hold JSON data as text.
Anyway, I decided to create a proof of concept with just the basic Node and Edge attributes first. I also extended the sample database a little so I could have a bit more complexity. I decided to forget about using nice icons for now, and just keep it simple!
PowerApps in PowerBI with Visio!!!
I am very excited to see that the preview for PowerApps in PowerBI has been released ( see Announcing availability of PowerApps custom visual for Power BI (preview) ). I saw this demonstrated months ago, and have been waiting impatiently ever since. Every time I have embedded a Visio diagram into PowerBI, I have wanted to display the selected shape data in a detail view … and now I can!
I cannot yet create a PowerBI report with the embedded PowerApps visual for consumption by the whole internet, but it should still solve many scenarios for organisations. I quickly added the new PowerApps visual to my example synchronised Org Chart and Desk Layout from my previous article ( #Visio in #PowerBI for viewing personnel hierarchies and locations ) , and recorded a simple selection in the following gif:
To do this, I simply created a default new PowerApps app from the queryOrg query in Excel workbook I created previously, and modified the Item value for the DetailForm of the DetailScreen. I removed the BrowseScreen and EditScreen because they were not required. Then, hey presto, the correct record is displayed whenever a shape is selected.
Visio in PowerBI for viewing personnel hierarchies and locations
My last article, Aliasing Data Columns for #Visio Organization Chart Wizard , mentioned the slight anomalies in the default Shape Data rows for the Organization Chart shapes and the Resources / Person shape. This prompted me to create an alternative view of the same data that can be linked to the Person shapes on a floor plan, and then to use the preview Visio Custom Visual in Power BI to display both views of personnel synchronised by the same data. This demonstrates how easy it is to create an effective dashboard for locating personnel locations and their position within an organisational hierarchy at the same time!