Documentation

Define Foreign Keys

 

Foreign keys represent unique relationships between two or more fields from different tables of your database. In order to build joined graphs and charts you may have to define these relationships between your fields manually in the Reference Editor.

 

Go to Connect and open your database connection with a click on the Edit icon in your database widget. This will forward you to the Database Connection screen. Skip the Setup and Import Steps and go to References.

 

 

  1. In the Reference Editor, click on the data field in the left most table structure which you want to match to a corresponding field from another table. Please make sure that at least one of these fields contains unique values.
  2. Corresponding to the selected field you can now choose from a list of potentially matching fields from other tables in your database. Please select the matching field from the table structure to the right.
  3. Click Add and your foreign key will be added to the list of references on the right.
  4. To delete a foreign key click on the trash bin next to the two matched fields.
  5. When you are done adding, editing or deleting foreign keys click on Save and Proceed to populate your changes to your data connection.

 

define-forgeign-keys

 

 

Tips:

 

If you don’t know the right foreign keys for your table please ask your IT team or database administrator to identify the right matches in your database.