Creating a join

Learn how you can create new data joins in a dataset in Cloudera Data Visualization.

  1. On the left navigation panel, click Data.

    The Data view opens, displaying the Datasets tab.

  2. Select a connection from the connection list on the left side panel.
  3. In the Datasets area, click the dataset you want to modify.
  4. In the side navigation menu, click Data Model.
    The Data Model view appears, and shows the name of the only table in the dataset.
  5. Click Edit in the top-right corner of the page.
  6. Click the sign on the table representation.

    The Table Browser modal opens.

  7. Select the table to join.
    In this example, the following settings are used:
    • Under Database Name, choose main.

    • Under Table Name, choose the us_counties table.

      This value is pre-populated to match the existing table of the dataset, but it may be changed.

  8. Click Select

    The Edit Join modal opens.

    When editing a join, the following options are available:

    • Clear Fields is for clearing all already defined joins between the two tables.
    • Add Join Pair is for adding another column connection between the same two tables.
    • The trash icon beside a join pair is for removing it.

    • Add Join Expression is for adding a join between the two tables based on a custom SQL expression.
    • icon (minus) is for removing an existing join pair or an existing join expression.
    • In the Join Expressions section, you can click the text box to open the Join Expression modal, where you can specify or update a custom SQL expression that defines the join conditions.
  9. Select the matching columns for both tables.

    You can lick Sample Data to view some data in both columns, and verify that the join makes sense. Click again to hide the sample data.

  10. Click Apply.
  11. Repeat the previous step if you want to create more joins.
  12. Click Save.
  13. Click Edit in the top-right corner if you want to change the data model.
    You can click the two overlapping circles on the line connecting the tables to edit the join conditions or change the join type.