Help and Support > Table of Contents > Using multiple canvases

Using Multiple Canvases

To manage your data transformation, Datamartist allows you to create as many canvases as required. All the canvases created are organised in a hierarchy, with the top canvas being the main canvas (which is created when you create a new document). By grouping blocks together, its possible to organise blocks so that calculations and transformations happen on the lower, sub-canvases and the results are consolidated and then returned to the main canvas. This can be illustrated with a sales data mart example. We'll load in a fact table and some data sets that can be used to create some dimensions, and use additional canvases to manage the dimensions and their components. We'll start with the following data files:

From a SQL Server database we load the following tables:

  • Sales System Data- the sales transaction data.
  • Product List- the list of products from the sales system.
  • Customer List- the list of customers from the sales system.

In addition we have the following data in text files:

  • USCityCensusData- Census information for US cities, including historical population.
  • States by Sales region- A file that mappes US states to sales regions.

When we use the import dataset functionality to load this data in, the blocks will be put on the visible canvas- in this case the Main Canvas, since we're in a new project. Lets organise the data sets into different canvases, one for each dimension.

Creating a new Canvas

  • Select all the blocks you wish to put on the new Canvas (in this example we'll select everything to do with customer data, right click one of the blocks, and select "Push to blocks to new sub-canvas"
using-sub-canvases-initial-push-blocks-to-subcanvas (96K)

  • Enter a unique name for the new canvas when prompted. (We'll use "Customer Dimension")

After the canvas is created you will note that the blocks you had selected have been replaced by a single block with the datamartist logo on it (this is the Canvas Block), and a new tab is now available in the canvas viewer;

using-sub-canvases-initial-push-blocks-resulting-canvas-block (63K)

You will notice that the new canvas block does not have any stubs. We'll now illustrate how to configure a sub-canvas, and define what data is accessible on the superior canvas via the canvas block. Either by selecting the new tab, or double clicking on the canvas block, you will navigate to the canvas "Customer Dimension", and will find the blocks that you selected initially;

using-sub-canvases-customer-canvas-view (67K)

First let's add some more blocks to this canvas, and connect them together to build our customer dimension. We'll join the customer list to the USCensus data, and the Sales regions to provide us with a customer dimension that lets us analyze by population and sales region.

Connecting blocks between canvases

  • Right click on the stub that you want to connect to the superior canvas and select "add stub on superior canvas block".

using-sub-canvases-customer-canvas-view-add-stub-to-superior (27K)

This will generate a new block and connect it to the stub you right clicked on. This block has a large number on it- this number corresponds to the label of the stub on the superior canvas block to which it is connected.

Navigating between canvases

  • Double click on the canvas connector block (blocks with large numbers indicating the stub on the superior canvas the block links to) to jump to the canvas.

push-block-to-sub-canvas-customer-dimension-navigate-up (24K)

And you will now see that on the Main Canvas, the cavas block that was created now has an output stub with the label "1"- this stub is connected to the output of the join block and now can be joined into the fact table to complete our customer dimension join.

push-block-to-sub-canvas-customer-dimension-on-main-canvas (28K)

Sub-canvases of sub-canvases

The creation of sub-canvases is allowed on sub-canvases, so it is possible to create as many canvases as are needed to manage the data transformations required. For example, if we wanted to make some specific new segmentation for the US census data we might make that a sub-canvas of the customer dimension we can see all the various canvases and their relationships by looking at the Canvases tab;

using-sub-canvases-sub-sub-canvases-in-tab (26K)