Tutorial | Flow management and views#

Get started#

As projects grow in complexity, the ability to efficiently organize, customize, and search within them becomes of greater value.

Objectives#

In this tutorial, you will:

  • Organize a project with Flow zones.

  • Customize the display of the Flow.

  • Search inside the Flow for items, and apply mass actions.

  • Learn how to undo changes in the Flow.

Prerequisites#

To reproduce the steps in this tutorial, you’ll need:

  • Dataiku 13.4 or later.

  • Basic knowledge of Dataiku (Core Designer level or equivalent).

Create the project#

  1. From the Dataiku Design homepage, click + New Project.

  2. Select Learning projects.

  3. Search for and select Flow Management.

  4. If needed, change the folder into which the project will be installed, and click Create.

  5. From the project homepage, click Go to Flow (or type g + f).

Note

You can also download the starter project from this website and import it as a ZIP file.

You’ll next want to build the Flow.

  1. Click Flow Actions at the bottom right of the Flow.

  2. Click Build all.

  3. Keep the default settings and click Build.

Use case summary#

The project has three data sources:

Dataset

Description

tx

Each row is a unique credit card transaction with information such as the card that was used and the merchant where the transaction was made.

It also indicates whether the transaction has either been:

  • Authorized (a score of 1 in the authorized_flag column)

  • Flagged for potential fraud (a score of 0)

merchants

Each row is a unique merchant with information such as the merchant’s location and category.

cards

Each row is a unique credit card ID with information such as the card’s activation month or the cardholder’s FICO score (a common measure of creditworthiness in the US).

Organize a Flow into zones#

While this Flow has only ten datasets, true projects can be much larger — perhaps more than 100 datasets and recipes.

Flow zones are one key organizational tool to divide a complex Flow into more manageable sections. They make it easier to understand the overall purpose of a Flow.

Looking at the Flow of this project, you can abstract its purpose to two stages: data ingestion and data preparation. These stages are natural buckets for separate Flow zones.

Move items to a new zone#

Start by moving items to a new Flow zone.

  1. Hold the Cmd/Ctrl key, and select the five datasets furthest downstream:

    • tx_prepared

    • tx_distinct

    • tx_pivot

    • tx_topn

    • tx_windows

  2. In the Actions (Actions icon.) tab of the right panel, under Flow Zones, select Move (or right-click on the selection, and select Move to a flow zone).

  3. Name the zone Data preparation, and review which recipes will move as well.

  4. Click Confirm.

Dataiku screenshot of the dialog for moving datasets to a new Flow zone.

Rename the default zone#

You’ll find the remaining items automatically grouped into a default Flow zone.

  1. Select the Default Flow zone.

  2. In the Actions (Actions icon.) tab, click Edit.

  3. Rename the Flow zone Data ingestion.

  4. Click Confirm.

Dataiku screenshot of the dialog for renaming a Flow zone.

Customize the display of the Flow#

Once you have the Flow organized into more manageable zones, you might also look into options to configure the Flow’s display. One quick temporary option is right clicking on an item, and selecting the option to Hide all upstream or Hide all downstream.

There are also a number of more persistent Flow display options.

  1. From the More Options (Horizontal dots icon.) menu of the top navigation bar, select Settings.

  2. From the right panel, select Flow display.

  3. Although it will have only a small impact for this particular Flow, uncheck the option to Anchor Flow graph.

  4. Check the box to Manually position zones.

    Dataiku screenshot of the Flow display settings menu.
  5. Click Save.

  6. Return to the Flow (g + f), and examine the differences, including the ability to drag zones to your preferred locations.

Search within a Flow#

Knowing how to efficiently search for information within a large Flow can be a huge time saver.

Directly beneath the top navigation bar, the Flow has three boxes to help you identify patterns, search for items, and make selections (based on which you can apply mass actions).

Apply a view#

Starting on the left, a menu of Flow views provides color-coded representations according to a variety of properties. For example, you can use these views to:

  • Analyze selections of connections and recipe engines.

  • Review which items have the most recent changes.

  • Track the size of data at each step in the Flow.

To give another use case, perhaps you want to change a column in one recipe. However, you’re unsure of what unintended impact your changes could have. First, it would be a good idea to trace the column lineage (Data lineage icon.) from the Schema (Schema icon.) tab of the right panel.

You can also use a Flow view to examine the usage of a particular column.

  1. At the top left, click Apply a View, and select Column Usages.

  2. Notice two chips immediately added to the search box, with the column_usage chip ending in a :.

  3. Underneath the search bar, select cardholder_fico_range so that the second chip reads column_usage:cardholder_fico_range.

  4. Click Select Items to confirm the selection of all datasets in the Flow matching the present search criteria.

  5. As an example, with these four datasets selected, open the Actions (Actions icon.) tab, and click Watch.

Dataiku screenshot of a column usage Flow view.

Tip

In this case, it wouldn’t have been difficult to manually select these four datasets. However, this tool provides a way to apply mass actions (such as tagging) on much larger item selections.

Search by keyword#

When applying the column usage Flow view, you may have noticed that Flow views are a shortcut to one possible type of search criteria (view:name). You can also add a much broader range of criteria directly to the search bar following a keyword:value format.

Be aware that, when adding multiple search conditions, the underlying operator logic is AND. Test this for yourself.

  1. Clear all criteria from the search bar.

  2. To confirm you’re watching the four datasets including the column of interest, click Apply a View > Watched and Starred. Then clear the search bar again.

  3. Click in the search bar (or use the shortcut Cmd/Ctrl + f) to initiate a new search.

  4. Select or type the keyword connections. Select filesystem_managed so that the full chip reads connections:fileystem_managed. Recognize the selection of seven datasets.

  5. In the search bar, add a second condition by typing or selecting watched_and_starred:Watching.

  6. Click Select Items.

  7. Notice that, instead of selecting all seven datasets that satisfy either condition (OR logic), the search returns only the four datasets matching both conditions (AND logic).

Dataiku screenshot of search criteria in the Flow.

Undo a change in the Flow#

Mistakes happen. When they do, it’s a great comfort to have an “undo” button. A Git repository tracks changes to Dataiku projects. This makes it possible to revert a project to an earlier state.

Delete a Flow zone#

To trial this idea, delete a Flow zone.

  1. Select the Data preparation Flow zone.

  2. In the Actions (Actions icon.) tab, click Delete.

  3. Click Confirm.

Dataiku screenshot of the option to delete a Flow zone.

You’ll see that both Flow zones disappear. This is because items in the deleted Flow zone move to the Default Flow zone (renamed as Data ingestion). However, when there’s only one zone, you’re left with the single Flow itself.

Tip

If you had tried to delete the Data ingestion Flow zone, it wouldn’t have been possible. You can’t delete the default Flow zone.

Revert a change#

Imagine you had deleted the Flow zone by accident. Roll back this change.

  1. From the More Options (Horizontal dots icon.) menu in the top navigation bar, select Version Control.

  2. Click on the change you made before deleting the Flow zone. (Assuming you made no other changes, this will be the second item in the list from the top.)

  3. Select Revert To This Revision and Confirm to undo any changes you made after this commit.

    Dataiku screenshot of the dialog for reverting to a previous version.
  4. Return to the Flow (g + f) to see the restored zone.

See also

To learn more about version control in Dataiku, see Project Version Control.

Next steps#

Having learned the basics of Flow organization, customization, and searching, you’re ready to tackle larger projects!

To learn about how to use Flow zones to your advantage when building datasets, check out Tutorial | Build modes!

See also

For more information, see Working with Flow zones in the Developer Guide.