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: Budget
| Month                   |   ProductId |   Budgeted Amt |
|:------------------------|------------:|---------------:|
| 2014-01-01 00:00:00.000 |           1 |         350338 |
| 2014-02-01 00:00:00.000 |           1 |         328805 |
| 2014-03-01 00:00:00.000 |           1 |         495140 |
| 2014-04-01 00:00:00.000 |           1 |         345179 |
| 2014-05-01 00:00:00.000 |           1 |         657987 |
| 2014-06-01 00:00:00.000 |           1 |         516429 |
| 2014-07-01 00:00:00.000 |           1 |         608520 |
| 2014-08-01 00:00:00.000 |           1 |         634402 |
| 2014-09-01 00:00:00.000 |           1 |         686600 |
| 2014-10-01 00:00:00.000 |           1 |         806476 |


Table: Date
| Date                    |   Year | Month   | QTR   |   Month No |
|:------------------------|-------:|:--------|:------|-----------:|
| 2014-01-01 00:00:00.000 |   2014 | January | Qtr 1 |          1 |
| 2014-01-02 00:00:00.000 |   2014 | January | Qtr 1 |          1 |
| 2014-01-03 00:00:00.000 |   2014 | January | Qtr 1 |          1 |
| 2014-01-04 00:00:00.000 |   2014 | January | Qtr 1 |          1 |
| 2014-01-05 00:00:00.000 |   2014 | January | Qtr 1 |          1 |
| 2014-01-06 00:00:00.000 |   2014 | January | Qtr 1 |          1 |
| 2014-01-07 00:00:00.000 |   2014 | January | Qtr 1 |          1 |
| 2014-01-08 00:00:00.000 |   2014 | January | Qtr 1 |          1 |
| 2014-01-09 00:00:00.000 |   2014 | January | Qtr 1 |          1 |
| 2014-01-10 00:00:00.000 |   2014 | January | Qtr 1 |          1 |


Table: Product Master
|   ProductId | Product Name   | Category   |
|------------:|:---------------|:-----------|
|           1 | Product1       | Cat1       |
|           2 | Product2       | Cat1       |
|           3 | Product3       | Cat1       |
|           4 | Product4       | Cat1       |
|           5 | Product5       | Cat2       |
|           6 | Product6       | Cat2       |
|           7 | Product7       | Cat2       |
|           8 | Product8       | Cat3       |
|           9 | Product9       | Cat3       |
|          10 | Product10      | Cat3       |


Table: Sales
| Date                    |   ProductId |   Sale Amount |
|:------------------------|------------:|--------------:|
| 2014-01-01 00:00:00.000 |           1 |        4563   |
| 2014-01-02 00:00:00.000 |           1 |        9876.6 |
| 2014-01-03 00:00:00.000 |           1 |       11012.4 |
| 2014-01-04 00:00:00.000 |           1 |       11200.5 |
| 2014-01-05 00:00:00.000 |           1 |        3679   |
| 2014-01-06 00:00:00.000 |           1 |        2970.5 |
| 2014-01-07 00:00:00.000 |           1 |       13966.4 |
| 2014-01-08 00:00:00.000 |           1 |       17750.4 |
| 2014-01-09 00:00:00.000 |           1 |        1887   |
| 2014-01-10 00:00:00.000 |           1 |       19710   |

 


tables: name: Budget
data: Budget.csv
name: Date
data: Date.csv
name: Product Master
data: Product Master.csv
name: Sales
data: Sales.csv
label: Budget
ProductId
Product Master
ProductId
Sales
ProductId
Product Master
ProductId
output: {
    "joins": [
        {
            "from_table": "Budget",
            "from_column": "ProductId",
            "to_table": "Product Master",
            "to_column": "ProductId"
        },
        {
            "from_table": "Sales",
            "from_column": "ProductId",
            "to_table": "Product Master",
            "to_column": "ProductId"
        }
    ]
}