Oracle Blockchain Platform tutorial, Part 3 of 3: Blockchain Analytics with Oracle Analytics Cloud

An overview of Oracle Analytics Cloud and how it can be leveraged to report on blockchain activity

Introduction

Welcome to Part 3, of my three part series, on Oracle Blockchain platform. Hopefully by now you have read Part 1 and Part 2. If you haven't, I recommend checking them out.

In this post I'm going to talk about Oracle Analytic Cloud (OAC), which is a fantastic data visualization and analytics tool. While this use case is tied to the work I did with Oracle's Blockchain platform, this tutorial can be applied broadly, it is not only relevant to Blockchain. In fact, if you read Part 2 in this series then you already know about the Rich History Database and you understand that we will actually be building our visualizations on top of Autonomous Data Warehouse (ADW), not the Blockchain itself.

Setting up a connection to Oracle Analytics

Let's jump right in to the tutorial and set up a data connection from Oracle Analytics to our Rich History Database. I'm going to take for granted that you are already familiar with Oracle Analytics, if not check out the website. Also be aware that OAC comes in a few different flavors that run in the cloud, "on-premise", or on the desktop. I'm going to be using the Cloud version in this tutorial, but most of the steps are interchangeable across the different instances of OA.

ADW Wallet

First thing we are going to need is our ADW wallet to set up our connection to the database in OAC. Go to your OCI dashboard and navigate to Autonomous Data Warehouse, then click on your instance.


Go to Service Console, Administration section, and click on Download Client Credentials (Wallet). Give it a password and save it to your PC.


OAC

Connection

Now that we have our Wallet, we can head over to OAC. The first thing we need to do is set up a new Connection to ADW using our Wallet.

From the OAC Home page, click on Create in the upper right corner and select Connection.


Select Oracle Autonomous Data Warehouse for the connection type.


Give your Connection a Name, then jump to Client Credentials and hit the Select button. Navigate to the directory where you downloaded your Wallet file and select it. This should fill in the Service Name field. Lastly, enter your Username and Password, then hit Save.


You can then navigate to the Data section in OAC by clicking on the hamburger menu in the upper left corner and selecting Data. Go to the Connections tab to see the connection you created.



Data Set

Now that we have a connection, our next step is to create a Data Set. Click the Create button in the upper right and select Data Set.


Select the connection you created in the last step (note that if you had not created a connection yet, you could do so from this screen).



After you click on the connection you will be presented with the available schemas in your database. Select the schema that has the data you want to build visualizations from; in my case it is Admin.



Next you need to select an available Table or View. When you select the Table/View that you want, you will next be presented with the columns in that particular object to select the ones you want included in your data set. For ease, you can click the 'Add all' button, then click the 'Get Preview Data in the lower pane to view the data that is in the Table/View.



Click the Add button to move to the next step.

From here you can do some data prep work if you want it to apply to the data set globally. Alternatively, you can leave the data set as it is and go into a project where you can also do some data manipulation, with the difference being that any changes made to a data set within a project will only be applicable to that project and not to other projects or users who may work with it.

In this case, there is one change I am going to make to the data set itself and that is to change my LINEAMOUNT field from an Attribute to a Measure and make sure it is Converted to a number.

From within the data prep area for the data set, I am going to select my LINEAMOUNT column. In the lower left panel I will see info about my column. For the line 'Treat As' I am going to change it from Attribute to Measure.



! Note that there are often more than one way to do something in OAC. For instance, instead of using the information pane in the lower left corner, I could have simply clicked the 'A' in the upper left header of the column.

In addition there are many features in the data prep that are beyond the scope of this tutorial. I highly recommend looking at the vast number of videos, blog posts, and product documentation that will explain these concepts in more depth.


Next I am going to convert my LINEAMOUNT column to a number by clicking on the hamburger menu in upper right header of the column and selecting 'Convert to Number'



To save my changes I click on apply Script in the left panel.

I'm now ready to build my first visualization.

Projects

Click the Create button in the upper Right.

You are now in the Visualization pane of an Untitled Project. Click Save in the upper right to name the project and choose a folder to save it in.

Next begin to build the visualization by dragging fields from your data set onto the canvas. Note that values can be moved around to change the perspective of the view.

Here I've created a simple bar graph based on my sample data.



Advanced Visualizations

I'm done with the basics at this point. I've demonstrated how to connect OAC to your Blockchain Rich History Database, or really any ADW instance. You should now be set to connect OAC to your data source and begin building reports and dashboards. If you've been following along from Part 1 in this series you know that we only have a small amount of data on our Blockchain from some sample Chaincode. Of course, there is only so much we can do with such a small sample set of data. For this last section, I'd like to share some visualizations that were created in a Blockchain proof of concept I worked on. This instance has quite a bit more data, which helps to see what we can do with OAC against a populated Rich History database.


Here's an example of an executive dashboard. This is actually built with six visualization. You can see multiple fields have been added to the filter bar to allow the user more flexibility when reviewing data. The map visual is extremely easy to create since we had a data column with the country code in it. Without any further effort the map understood the country codes and applied the data to the correct coordinates on the map.

Another useful feature is the natural language generation visual. You should know that no one typed any of the content in the narrative on the page. OAC interpreted the data and generated the natural language response. As filters are applied and data values are changed, the narrative automatically updates itself.



This second visualization uses the built in OAC statistical models to generate a forecast based on prior history. How to build forecasts in OAC is beyond the scope of this post, but I recommend looking into it as it is a powerful feature.


Note that I am showing the grammar panel to help you figure out how to arrange your fields to generate a similar visual.


Generating heat maps are easy and they can be a strong visual for tracking large amounts of data. Here we are tracking transaction status across the country and currency the transaction is taking place in.



This Sankey chart is a powerful visualization to help understand data flows. Particularly useful on a blockchain, we can see from left to right where a transaction begins and the path it takes to its current state.




Another very useful visual for Blockchain is the Timeline visual. We often hear about Blockchain for solving Supply Chain or ingredient provenance in foods. Transactional provenance in a financial record can also be very useful. Here we can see the exact steps this transaction went through to get to its current state. You can see where it was hung up and when it eventually got resolved. This is very helpful in resolving unsettled transactions.


Similarly this visual demonstrates how you can bring more volume into the same visualization to tell a broader story about your timeline.


Conclusion

This brings me to the end of this series. I hope you looked at all three posts and were able to gain some benefit from the tutorial. There is a vast amount of information available for Blockchain, Analytics, and all of the intertwining technologies. I recommend thinking about how blockchain can impact your business processes. It is not a solution for all use cases but there are many use cases that will improve greatly from the implementation of blockchain. Be careful not to be disrupted by a competitor who leverages this technology ahead of you for a competitive advantage. Learn about it now, and be prepared for a much more decentralized world as we move along this journey.

Please feel free to leave a comment or reach out to me with any questions; and check back in the future for additional posts on Blockchain technology, or better yet, subscribe to this blog.

Thank you
-Gary





Comments