Skip to main content

Data Explorer Sample 8 - Snapshots

Data Explorer Team

Published: December 2011

Summary

Overview

In this exercise you will learn how to leverage the various capabilities of persisting a Data Explorer document.

Steps

In this exercise we will learn what are the different mechanisms for persisting a Data Explorer mashup document. Imagine that you have spent your time working on importing, cleansing, merging and transforming data from different sources using Data Explorer; how can you now store or persist this mashup in a way that can be accessed and consumed over time? This sample illustrates the various mechanisms available today in Data Explorer for accomplishing this task.

Task 1 – Start the “Data Explorer” application in either its client or cloud versions

  1. In the client: Start "Data Explorer" in the standalone mode via the Start menu.
  2. In the cloud: Log into “Data Explorer” using the site information credentials provided for your use during this sample.

The Workspace is shown in Figure 1.


Figure 1: Workspace Screen

Task 2 – Open an existing mashup

  1. In the “Data Explorer” My Workspace view, select your Sample 0 mashup, or if you do not have it available, simply use the More -> Import option and select the Sample 8 – Start.import file located in the same folder as this document.
  2. The mashup should be imported successfully and you will see it in the My Worskpace view.
  3. Notice you can preview the live results of the Customers data in the lower part of the My Workspace view (see Figure 2).


Figure 2: Preview of Customers data from My Worskpace view

Task 3 – Persisting the final Customers data

The data showed in Figure 2 is the live results of our mashup. This data is subject to change over time, for various reasons: original data input (Excel file) is updated, the mashup document is modified to perform different data transformations, etc. In order to persist the result of this mashup, Data Explorer offers two different alternatives:

  • Extend: This feature allows us to create a live copy of the original mashup document. This new document references the result of the original document. By using this document, we have the ability to extend the original mashup (i.e. adding new data sources or tasks to it) without affecting it.
  • Snapshot: An alternative mechanism for persisting a mashup consists of creating a stored versionof the document. This can be useful when the results take a while to calculate, or if you want to save a history of the results. Creating a snapshot will create a new document that refers to the original document. When you refresh the snapshot, it will evaluate the source document and store the results either: in a database of your choosing, or as an embedded excel file in the snapshot file. This configuration is stored in the snapshot document, so you can refresh without having to specify it each time. It is possible to use a different schema name for each snapshot in the same database (so you don’t have to create a new database each time you create a snapshot).

The next two tasks of this sample will be a walkthrough the details on how to extend and snapshot data using Data Explorer.

Task 4 – Extend Customers data

In this task, we will extend Customers data. In order to do this, we need to perform the following steps:

  1. Right click on Sample 8 – Start in My Workspace view. We will get a contextual menu that gives us the option to Extend a mashup. An alternative way of doing this is to click Use in the upper menu; you can see both in Figure 3.


Figure 3: Extending a mashup

  1. We will be prompted for a name for this extension. By default, it will add “- extension1” to the original mashup name. We can leave this default name and hit OK, and that will give us a copy of the mashup that we can extend, as shown in Figure 4.


Figure 4: Creating an extension

Task 5 – Snapshot Customers data

An alternative way of persisting the data is to take a snapshot of it, as described above. To snapshot data in Data Explorer, perform the following steps:

  1. Select the original Sample 8 – Start in My Worskpace view.
  2. Right click on it, as we did in Task 4, but this time select Snapshot. This will open the Snapshot tab in the lower part of My Workspace view, with a description of the Snapshot functionality (see Figure 5).


Figure 5: Create Snapshot description and options

  1. Choose a Snapshot Name (the default is Sample 8 – Start – snapshot) and click Create to proceed.
  2. Select whether to store this snapshot in a Data Explorer Document or a Database. Selecting Database would save the snapshot in a SQL Server Database (or SQL Azure) for faster processing, in the case of large result sets. However, for the purpose of this sample, we will snapshot the mashup to a Data Explorer document by clicking on the “Document” icon, as seen in Figure 6.


Figure 6: Snapshot to Document or Database options

  1. When prompted to Update or Cancel the snapshot process, select Update. You will be notified that the snapshot has not been started and be given the choice to return to the previous options by clicking Configure, or to Start the snapshot process (see Figure 7).


Figure 7: Start or Configure snapshot options

Select Start and it will update this menu to display information about the ongoing snapshot process. This process may take a while, depending on the size of the results. During this process, shown in Figure 8, Data Explorer generates a copy of resource from the original document. There is also the option to Stop the process at any time, this would cancel the snapshot process without generating a snapshot.


Figure 8: Runnig a snapshot

  1. At the end of the process, a summary will display. As shown in Figure 9.


Figure 9: The “Snapshot Completed” summary

  1. We can now access the snapshot document from the My Workspace view. The Customers data showed in the Preview (see Figure 10) is a point in time copy of the original Sample 8 – Start document.


Figure 10: Previewing results in a Snapshot from My Workspace view.