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: DIM_Calendar
|   DateKey | Date                    | Day       |   WeekNmbr | Month   | MonthShort   |   MonthNmbr |   Quarter |   Year |   YearIndex |
|----------:|:------------------------|:----------|-----------:|:--------|:-------------|------------:|----------:|-------:|------------:|
|  20200701 | 2020-07-01 00:00:00.000 | Wednesday |         27 | July    | Jul          |           7 |         3 |   2020 |           7 |
|  20200702 | 2020-07-02 00:00:00.000 | Thursday  |         27 | July    | Jul          |           7 |         3 |   2020 |           7 |
|  20200703 | 2020-07-03 00:00:00.000 | Friday    |         27 | July    | Jul          |           7 |         3 |   2020 |           7 |
|  20200704 | 2020-07-04 00:00:00.000 | Saturday  |         27 | July    | Jul          |           7 |         3 |   2020 |           7 |
|  20200705 | 2020-07-05 00:00:00.000 | Sunday    |         28 | July    | Jul          |           7 |         3 |   2020 |           7 |
|  20200706 | 2020-07-06 00:00:00.000 | Monday    |         28 | July    | Jul          |           7 |         3 |   2020 |           7 |
|  20200707 | 2020-07-07 00:00:00.000 | Tuesday   |         28 | July    | Jul          |           7 |         3 |   2020 |           7 |
|  20200708 | 2020-07-08 00:00:00.000 | Wednesday |         28 | July    | Jul          |           7 |         3 |   2020 |           7 |
|  20200709 | 2020-07-09 00:00:00.000 | Thursday  |         28 | July    | Jul          |           7 |         3 |   2020 |           7 |
|  20200710 | 2020-07-10 00:00:00.000 | Friday    |         28 | July    | Jul          |           7 |         3 |   2020 |           7 |


Table: DIM_Customer
|   CustomerKey | First Name   | Last Name   | Full Name         | Gender   | DateFirstPurchase       | Customer City   |
|--------------:|:-------------|:------------|:------------------|:---------|:------------------------|:----------------|
|         11400 | Franklin     | Raji        | Franklin Raji     | Male     | 2018-07-15 00:00:00.000 | London          |
|         11408 | Darren       | Gill        | Darren Gill       | Male     | 2020-03-05 00:00:00.000 | London          |
|         11475 | Cesar        | Subram      | Cesar Subram      | Male     | 2020-04-23 00:00:00.000 | London          |
|         11488 | Jermaine     | Lopez       | Jermaine Lopez    | Male     | 2018-10-28 00:00:00.000 | London          |
|         11491 | Andre        | Perez       | Andre Perez       | Male     | 2018-11-07 00:00:00.000 | London          |
|         11563 | Cesar        | Srini       | Cesar Srini       | Male     | 2020-07-05 00:00:00.000 | London          |
|         11603 | Geoffrey     | Gonzalez    | Geoffrey Gonzalez | Male     | 2019-01-18 00:00:00.000 | London          |
|         12210 | Alan         | He          | Alan He           | Male     | 2019-03-15 00:00:00.000 | London          |
|         12233 | Jerry        | Yuan        | Jerry Yuan        | Male     | 2021-01-17 00:00:00.000 | London          |
|         12239 | Alberto      | Ramos       | Alberto Ramos     | Male     | 2019-03-23 00:00:00.000 | London          |


Table: DIM_Products
|   ProductKey | ProductItemCode   | Product Name          | Sub Category   | Product Catgory   | Product Color   | Product Size   | Product Line   | Product Model Name   | Product Description   | Product Status   |
|-------------:|:------------------|:----------------------|:---------------|:------------------|:----------------|:---------------|:---------------|:---------------------|:----------------------|:-----------------|
|            1 | AR-5381           | Adjustable Race       | NULL           | NULL              | NA              | NULL           | NULL           | NULL                 | NULL                  | Current          |
|            2 | BA-8327           | Bearing Ball          | NULL           | NULL              | NA              | NULL           | NULL           | NULL                 | NULL                  | Current          |
|            3 | BE-2349           | BB Ball Bearing       | NULL           | NULL              | NA              | NULL           | NULL           | NULL                 | NULL                  | Current          |
|            4 | BE-2908           | Headset Ball Bearings | NULL           | NULL              | NA              | NULL           | NULL           | NULL                 | NULL                  | Current          |
|            5 | BL-2036           | Blade                 | NULL           | NULL              | NA              | NULL           | NULL           | NULL                 | NULL                  | Current          |
|           12 | CR-9981           | Crown Race            | NULL           | NULL              | NA              | NULL           | NULL           | NULL                 | NULL                  | Current          |
|           13 | CS-2812           | Chain Stays           | NULL           | NULL              | NA              | NULL           | NULL           | NULL                 | NULL                  | Current          |
|           14 | DC-8732           | Decal 1               | NULL           | NULL              | NA              | NULL           | NULL           | NULL                 | NULL                  | Current          |
|           15 | DC-9824           | Decal 2               | NULL           | NULL              | NA              | NULL           | NULL           | NULL                 | NULL                  | Current          |
|           16 | DT-2377           | Down Tube             | NULL           | NULL              | NA              | NULL           | NULL           | NULL                 | NULL                  | Current          |


Table: FACT_Budget
| Date                    |   Budget |
|:------------------------|---------:|
| 2020-01-01 00:00:00.000 |   800000 |
| 2020-02-01 00:00:00.000 |   800000 |
| 2020-03-01 00:00:00.000 |  1000000 |
| 2020-04-01 00:00:00.000 |  1000000 |
| 2020-05-01 00:00:00.000 |  1100000 |
| 2020-06-01 00:00:00.000 |  1100000 |
| 2020-07-01 00:00:00.000 |  1500000 |
| 2020-08-01 00:00:00.000 |  1500000 |
| 2020-09-01 00:00:00.000 |  1500000 |
| 2020-10-01 00:00:00.000 |  1500000 |


Table: FACT_InternetSales
|   ProductKey |   OrderDateKey |   DueDateKey |   ShipDateKey |   CustomerKey | SalesOrderNumber   |   SalesAmount |
|-------------:|---------------:|-------------:|--------------:|--------------:|:-------------------|--------------:|
|          477 |       20191228 |     20200109 |      20200104 |         11245 | SO51178            |             5 |
|          477 |       20191228 |     20200109 |      20200104 |         16313 | SO51180            |             5 |
|          477 |       20191229 |     20200110 |      20200105 |         12390 | SO51191            |             5 |
|          477 |       20191229 |     20200110 |      20200105 |         18906 | SO51196            |             5 |
|          477 |       20191229 |     20200110 |      20200105 |         11448 | SO51197            |             5 |
|          477 |       20191229 |     20200110 |      20200105 |         11006 | SO51198            |             5 |
|          477 |       20191229 |     20200110 |      20200105 |         21440 | SO51199            |             5 |
|          477 |       20191230 |     20200111 |      20200106 |         18208 | SO51203            |             5 |
|          477 |       20191230 |     20200111 |      20200106 |         11240 | SO51205            |             5 |
|          477 |       20191230 |     20200111 |      20200106 |         11400 | SO51206            |             5 |


Table: MonthIndex
| Month   |   MonthNum |
|:--------|-----------:|
| Jan     |          1 |
| Feb     |          2 |
| Mar     |          3 |
| Apr     |          4 |
| May     |          5 |
| Jun     |          6 |
| Jul     |          7 |
| Aug     |          8 |
| Sep     |          9 |
| Oct     |         10 |

 


tables: name: DIM_Calendar
data: DIM_Calendar.csv
name: DIM_Customer
data: DIM_Customer.csv
name: DIM_Products
data: DIM_Products.csv
name: FACT_Budget
data: FACT_Budget.csv
name: FACT_InternetSales
data: FACT_InternetSales.csv
name: MonthIndex
data: MonthIndex.csv
label: FACT_InternetSales
ProductKey
DIM_Products
ProductKey
FACT_InternetSales
CustomerKey
DIM_Customer
CustomerKey
FACT_InternetSales
OrderDateKey
DIM_Calendar
DateKey
FACT_Budget
Date
DIM_Calendar
Date
DIM_Calendar
MonthShort
MonthIndex
Month
output: {
    "joins": [
        {
            "from_table": "FACT_InternetSales",
            "from_column": "ProductKey",
            "to_table": "DIM_Products",
            "to_column": "ProductKey"
        },
        {
            "from_table": "FACT_InternetSales",
            "from_column": "CustomerKey",
            "to_table": "DIM_Customer",
            "to_column": "CustomerKey"
        },
        {
            "from_table": "FACT_InternetSales",
            "from_column": "OrderDateKey",
            "to_table": "DIM_Calendar",
            "to_column": "DateKey"
        },
        {
            "from_table": "FACT_Budget",
            "from_column": "Date",
            "to_table": "DIM_Calendar",
            "to_column": "Date"
        },
        {
            "from_table": "DIM_Calendar",
            "from_column": "MonthShort",
            "to_table": "MonthIndex",
            "to_column": "Month"
        }
    ]
}