Task: equi-join-detect (source dataset: Auto-BI)

Your are given a database with related tables used for business intelligence analysis. Your task is to identify all key/foreign-key join relationships between the tables for this database. Recall that a join is a relationship between two tables, that allows rows from one table to be combined with rows from another, based on a set of common join columns.
 
 
No explanation needed. Please return all join relationships in the following JSON format:
{
  "joins": [
    {
      "from_table": "table-1",
      "from_column": "column-1",
      "to_table": "table-2",
      "to_column": "column-3"
    }, 
	...
  ]
}

Tables:

Table: link table
| BudgetKey          |   DepartmentID | Expense Category   | ExpenseKey         | Month   | Period                  | Quarter   |   Year | Category   |
|:-------------------|---------------:|:-------------------|:-------------------|:--------|:------------------------|:----------|-------:|:-----------|
| Food_101_1/1/2013  |            101 | Food               | Food_101_1/1/2013  | Jan     | 2013-01-01 00:00:00.000 | Q1        |   2013 | Food       |
| Food_101_2/1/2013  |            101 | Food               | Food_101_2/1/2013  | Feb     | 2013-02-01 00:00:00.000 | Q1        |   2013 | Food       |
| Food_101_3/1/2013  |            101 | Food               | Food_101_3/1/2013  | Mar     | 2013-03-01 00:00:00.000 | Q1        |   2013 | Food       |
| Food_101_4/1/2013  |            101 | Food               | Food_101_4/1/2013  | Apr     | 2013-04-01 00:00:00.000 | Q2        |   2013 | Food       |
| Food_101_5/1/2013  |            101 | Food               | Food_101_5/1/2013  | May     | 2013-05-01 00:00:00.000 | Q2        |   2013 | Food       |
| Food_101_6/1/2013  |            101 | Food               | Food_101_6/1/2013  | Jun     | 2013-06-01 00:00:00.000 | Q2        |   2013 | Food       |
| Food_101_7/1/2013  |            101 | Food               | Food_101_7/1/2013  | Jul     | 2013-07-01 00:00:00.000 | Q3        |   2013 | Food       |
| Food_101_8/1/2013  |            101 | Food               | Food_101_8/1/2013  | Aug     | 2013-08-01 00:00:00.000 | Q3        |   2013 | Food       |
| Food_101_9/1/2013  |            101 | Food               | Food_101_9/1/2013  | Sep     | 2013-09-01 00:00:00.000 | Q3        |   2013 | Food       |
| Food_101_10/1/2013 |            101 | Food               | Food_101_10/1/2013 | Oct     | 2013-10-01 00:00:00.000 | Q4        |   2013 | Food       |


Table: Sheet1 (2)
| Department            | Department Type   |   DepartmentID |
|:----------------------|:------------------|---------------:|
| C-level               | C-level           |            101 |
| Finance               | Finance           |            102 |
| Human Resources       | HR                |            104 |
| Marketing - Corporate | Marketing         |            106 |
| Marketing - Field     | Marketing         |            108 |
| Project Management    | Sales             |            201 |
| Sales - Americas      | Sales             |            301 |
| Sales - Finland       | Sales             |            302 |
| Sales - France        | Sales             |            304 |
| Sales - Germany       | Sales             |            305 |


Table: Sheet1 (3)
|   DepartmentID |   EmployeeCount |
|---------------:|----------------:|
|            106 |              31 |
|            401 |               8 |
|            301 |              15 |
|            406 |               9 |
|            107 |               7 |
|            403 |               6 |
|            305 |               7 |
|            104 |               7 |
|            407 |              12 |
|            404 |               9 |


Table: Sheet1 (4)
| Amount   | Billable   | Date     | Employee      | Expense Type    | ExpenseKey              |   DepartmentID | Category   | AMOUNT YTD   |
|:---------|:-----------|:---------|:--------------|:----------------|:------------------------|---------------:|:-----------|:-------------|
|          |            | 1/1/2013 | Carter  Petti | Internet        | Operations_106_1/1/2013 |            106 | Operations |              |
|          |            | 1/1/2013 | Carter  Petti | Marketing       | Operations_106_1/1/2013 |            106 | Operations |              |
|          |            | 1/1/2013 | Carter  Petti | Mobile          | Operations_106_1/1/2013 |            106 | Operations |              |
|          |            | 1/1/2013 | Carter  Petti | Office Supplies | Operations_106_1/1/2013 |            106 | Operations |              |
|          |            | 1/1/2013 | Carter  Petti | Postage/Freight | Operations_106_1/1/2013 |            106 | Operations |              |
|          |            | 1/1/2013 | Carter  Petti | Recruiting      | Operations_106_1/1/2013 |            106 | Operations |              |
|          |            | 1/1/2013 | Carter  Petti | Telephone       | Operations_106_1/1/2013 |            106 | Operations |              |
|          |            | 1/1/2013 | Cher  Cobbley | Internet        | Operations_106_1/1/2013 |            106 | Operations |              |
|          |            | 1/1/2013 | Cher  Cobbley | Marketing       | Operations_106_1/1/2013 |            106 | Operations |              |
|          |            | 1/1/2013 | Cher  Cobbley | Mobile          | Operations_106_1/1/2013 |            106 | Operations |              |


Table: Sheet1
|   Budget | BudgetKey         |   DepartmentID | Date                    | Category   |   avg budget |   MTD BUDGET |
|---------:|:------------------|---------------:|:------------------------|:-----------|-------------:|-------------:|
|       34 | Food_108_1/1/2013 |            108 | 2013-01-01 00:00:00.000 | Food       |       195211 |           34 |
|      143 | Food_302_3/1/2013 |            302 | 2013-01-03 00:00:00.000 | Food       |        46414 |          143 |
|      156 | Food_101_4/1/2013 |            101 | 2013-01-04 00:00:00.000 | Food       |        42546 |          156 |
|      160 | Food_108_3/1/2013 |            108 | 2013-01-03 00:00:00.000 | Food       |        41482 |          160 |
|      164 | Food_101_2/1/2013 |            101 | 2013-01-02 00:00:00.000 | Food       |        40471 |          164 |
|      179 | Food_402_1/1/2013 |            402 | 2013-01-01 00:00:00.000 | Food       |        37079 |          179 |
|      181 | Food_101_1/1/2013 |            101 | 2013-01-01 00:00:00.000 | Food       |        36670 |          181 |
|      187 | Food_402_3/1/2013 |            402 | 2013-01-03 00:00:00.000 | Food       |        35493 |          187 |
|      191 | Food_302_1/1/2013 |            302 | 2013-01-01 00:00:00.000 | Food       |        34750 |          191 |
|      194 | Food_108_7/1/2013 |            108 | 2013-01-07 00:00:00.000 | Food       |        34212 |          194 |

 


tables: name: link table
data: link table.csv
name: Sheet1 (2)
data: Sheet1 (2).csv
name: Sheet1 (3)
data: Sheet1 (3).csv
name: Sheet1 (4)
data: Sheet1 (4).csv
name: Sheet1
data: Sheet1.csv
label: link table
BudgetKey
Sheet1
BudgetKey
link table
DepartmentID
Sheet1 (3)
DepartmentID
Sheet1 (4)
ExpenseKey
link table
ExpenseKey
Sheet1 (2)
DepartmentID
Sheet1
DepartmentID
output: {
    "joins": [
        {
            "from_table": "link table",
            "from_column": "BudgetKey",
            "to_table": "Sheet1",
            "to_column": "BudgetKey"
        },
        {
            "from_table": "link table",
            "from_column": "DepartmentID",
            "to_table": "Sheet1 (3)",
            "to_column": "DepartmentID"
        },
        {
            "from_table": "Sheet1 (4)",
            "from_column": "ExpenseKey",
            "to_table": "link table",
            "to_column": "ExpenseKey"
        },
        {
            "from_table": "Sheet1 (2)",
            "from_column": "DepartmentID",
            "to_table": "Sheet1",
            "to_column": "DepartmentID"
        }
    ]
}