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


Table: DIM_Customers
|   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 Category   | 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 | 2019-12-28 00:00:00.000 | 2020-01-09 00:00:00.000 | 2020-01-04 00:00:00.000 |         11245 | SO51178            |          4.99 |
|          477 | 2019-12-28 00:00:00.000 | 2020-01-09 00:00:00.000 | 2020-01-04 00:00:00.000 |         16313 | SO51180            |          4.99 |
|          477 | 2019-12-29 00:00:00.000 | 2020-01-10 00:00:00.000 | 2020-01-05 00:00:00.000 |         12390 | SO51191            |          4.99 |
|          477 | 2019-12-29 00:00:00.000 | 2020-01-10 00:00:00.000 | 2020-01-05 00:00:00.000 |         18906 | SO51196            |          4.99 |
|          477 | 2019-12-29 00:00:00.000 | 2020-01-10 00:00:00.000 | 2020-01-05 00:00:00.000 |         11448 | SO51197            |          4.99 |
|          477 | 2019-12-29 00:00:00.000 | 2020-01-10 00:00:00.000 | 2020-01-05 00:00:00.000 |         11006 | SO51198            |          4.99 |
|          477 | 2019-12-29 00:00:00.000 | 2020-01-10 00:00:00.000 | 2020-01-05 00:00:00.000 |         21440 | SO51199            |          4.99 |
|          477 | 2019-12-30 00:00:00.000 | 2020-01-11 00:00:00.000 | 2020-01-06 00:00:00.000 |         18208 | SO51203            |          4.99 |
|          477 | 2019-12-30 00:00:00.000 | 2020-01-11 00:00:00.000 | 2020-01-06 00:00:00.000 |         11240 | SO51205            |          4.99 |
|          477 | 2019-12-30 00:00:00.000 | 2020-01-11 00:00:00.000 | 2020-01-06 00:00:00.000 |         11400 | SO51206            |          4.99 |

 


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