Selecting multiple tables from a database connection

Follow

When connecting to a big data store or RDBMS data source, you can only select a single table of data. If you would like to select multiple tables, you must use Custom SQL or the SQL Designer. You can use these options to create joins between tables, so both datasets are included in your connection. This article will discuss how to use the SQL Designer to join multiple tables.

The SQL Designer is structured similarly to the Query Blender and provides an easy way to create joins between tables. If you are experienced with writing SQL, you can use the Custom SQL option to create joins instead. This article will discuss how to use the SQL Designer to join multiple tables. 

Note: For information on the different join types and conditions, see About join types.
To connect multiple tables using the SQL Designer
  1. In the Info step of the Data source Builder, click on the Select button underneath table. If you have not connected to a big data store or RDBMS data source yet, see Connecting to Relational Database Management Systems and Connecting to big data stores.
  2. Click on the Designer tab to open the SQL Designer.

  3. Click the Launch button.
  4. Select two or more tables from the Select a table drop-down list.
    Note: The tables you select must have a join key or common record to be joined.

  5. Click and drag from one half-circle on the sides of one table's box to a half-circle on the sides of another box. You will automatically be redirected to the Join definition window.

  6. In the Select a field drop-down list, select the attribute containing common values between the two tables.
  7. Click on the = icon to choose how the fields are related. By default fields are automatically equal to each other, but if you are joining around dates, you can use greater than or less than operators to exclude date ranges (see Creating join conditions).

  8. Click Add condition.
  9. Select the join type. You can select from three different join options. For information on the different join types, see Selecting a join type.

  10. Click Ok. BIME will then check to ensure that your join is valid, and you will be redirected to the SQL Designer.
  11. Click Ok again to finish joining your tables.
  12. The Designer tab will now show you the SQL query for your join. If you want to edit the join, you can launch the SQL Designer again or type directly into the query.

  13. Click Ok to finish creating your join.
  14. To the right of the Select button, you will see the first few lines of the query produced by the SQL Designer. You might see more or less lines, depending on your browser window size.

    You have now joined the two tables. In the Schema step of the Data source Builder, you will be able to see all imported elements from both tables.

Have more questions? Submit a request

1 Comments

  • 0

    With imports from Salesforce, it is very tedious to have to import one object (table) at a time.  Almost everything is only useful in conjunction with either lookups or master-child relationships.  Is there anyway of getting, for instance, Accounts and Contacts into BIME in a single import?

Please sign in to leave a comment.
Powered by Zendesk