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: Actuals1
| date                    |   Actuals | Channel   | Item   |   Product REF |   DayOfWeek |
|:------------------------|----------:|:----------|:-------|--------------:|------------:|
| 2019-01-01 00:00:00.000 |       202 | B         | 3C     |             3 |           3 |
| 2019-01-06 00:00:00.000 |       152 | C         | 5Q     |             3 |           1 |
| 2019-01-08 00:00:00.000 |       210 | A         | 5Q     |             3 |           3 |
| 2019-01-13 00:00:00.000 |       120 | B         | 2B     |             3 |           1 |
| 2019-01-14 00:00:00.000 |       125 | C         | 3C     |             3 |           2 |
| 2019-01-21 00:00:00.000 |       156 | B         | 3C     |             3 |           2 |
| 2019-01-23 00:00:00.000 |       215 | D         | 2B     |             3 |           4 |
| 2019-01-30 00:00:00.000 |       147 | C         | 3C     |             3 |           4 |
| 2019-01-31 00:00:00.000 |       154 | D         | 4D     |             3 |           5 |
| 2019-02-03 00:00:00.000 |       184 | C         | 5E     |             3 |           1 |


Table: Calendar Table
| Date                    |   Year |   Month | Month Name   |   Quarter |   Day of Week | Day Name   |   Week of Year |   Days from Today |   YearMonth | Period     |
|:------------------------|-------:|--------:|:-------------|----------:|--------------:|:-----------|---------------:|------------------:|------------:|:-----------|
| 2020-07-01 00:00:00.000 |   2020 |       7 | July         |         3 |             2 | Wednesday  |             27 |               182 |      202007 | Jul - 2020 |
| 2020-07-02 00:00:00.000 |   2020 |       7 | July         |         3 |             3 | Thursday   |             27 |               181 |      202007 | Jul - 2020 |
| 2020-07-03 00:00:00.000 |   2020 |       7 | July         |         3 |             4 | Friday     |             27 |               180 |      202007 | Jul - 2020 |
| 2020-07-04 00:00:00.000 |   2020 |       7 | July         |         3 |             5 | Saturday   |             27 |               179 |      202007 | Jul - 2020 |
| 2020-07-05 00:00:00.000 |   2020 |       7 | July         |         3 |             6 | Sunday     |             27 |               178 |      202007 | Jul - 2020 |
| 2020-07-06 00:00:00.000 |   2020 |       7 | July         |         3 |             0 | Monday     |             28 |               177 |      202007 | Jul - 2020 |
| 2020-07-07 00:00:00.000 |   2020 |       7 | July         |         3 |             1 | Tuesday    |             28 |               176 |      202007 | Jul - 2020 |
| 2020-07-08 00:00:00.000 |   2020 |       7 | July         |         3 |             2 | Wednesday  |             28 |               175 |      202007 | Jul - 2020 |
| 2020-07-09 00:00:00.000 |   2020 |       7 | July         |         3 |             3 | Thursday   |             28 |               174 |      202007 | Jul - 2020 |
| 2020-07-10 00:00:00.000 |   2020 |       7 | July         |         3 |             4 | Friday     |             28 |               173 |      202007 | Jul - 2020 |


Table: DIM Channel
| Channel   |
|:----------|
| A         |
| B         |
| C         |
| D         |


Table: DIM Item
| Item   |
|:-------|
| 1A     |
| 2B     |
| 3C     |
| 4D     |
| 5E     |
| 5Q     |
| 6F     |


Table: DIM Product Ref
|   Product REF |
|--------------:|
|             1 |
|             2 |
|             3 |
|             4 |
|             5 |
|             6 |
|             7 |


Table: Hybrid Table
| HybridColumns       |   Index |
|:--------------------|--------:|
| Sum of Actuals      |       1 |
| Sum of Target       |       2 |
| % diff. over Target |       3 |
| Jan - 2020          |       4 |
| Feb - 2020          |       5 |
| Mar - 2020          |       6 |
| Apr - 2020          |       7 |
| May - 2020          |       8 |
| Jun - 2020          |       9 |
| Jul - 2020          |      10 |


Table: Item Actuals
| Item   |
|:-------|
| 3C     |
| 5E     |
| 5Q     |
| 2B     |
| 4D     |
| 1A     |
| 6F     |


Table: Target2
| date                    |   Target | Channel   | Item   |   Product REF |
|:------------------------|---------:|:----------|:-------|--------------:|
| 2020-01-03 00:00:00.000 |      153 | D         | 6F     |             2 |
| 2020-01-10 00:00:00.000 |      135 | C         | 5E     |             2 |
| 2020-01-12 00:00:00.000 |      171 | A         | 2B     |             2 |
| 2020-01-13 00:00:00.000 |      185 | B         | 3C     |             2 |
| 2020-01-18 00:00:00.000 |      219 | C         | 5E     |             2 |
| 2020-01-22 00:00:00.000 |      103 | C         | 4D     |             2 |
| 2020-01-25 00:00:00.000 |      209 | A         | 5Q     |             2 |
| 2020-02-02 00:00:00.000 |      203 | A         | 1A     |             2 |
| 2020-02-03 00:00:00.000 |      216 | B         | 3C     |             2 |
| 2020-02-04 00:00:00.000 |      154 | C         | 5E     |             2 |

 


tables: name: Actuals1
data: Actuals1.csv
name: Calendar Table
data: Calendar Table.csv
name: DIM Channel
data: DIM Channel.csv
name: DIM Item
data: DIM Item.csv
name: DIM Product Ref
data: DIM Product Ref.csv
name: Hybrid Table
data: Hybrid Table.csv
name: Item Actuals
data: Item Actuals.csv
name: Target2
data: Target2.csv
label: Target2
Channel
DIM Channel
Channel
Target2
Item
DIM Item
Item
Actuals1
Item
DIM Item
Item
Target2
Product REF
DIM Product Ref
Product REF
Actuals1
Product REF
DIM Product Ref
Product REF
Actuals1
Channel
DIM Channel
Channel
Target2
Item
Item Actuals
Item
Actuals1
Item
Item Actuals
Item
Actuals1
date
Calendar Table
Date
Target2
date
Calendar Table
Date
output: {
    "joins": [
        {
            "from_table": "Target2",
            "from_column": "Channel",
            "to_table": "DIM Channel",
            "to_column": "Channel"
        },
        {
            "from_table": "Target2",
            "from_column": "Item",
            "to_table": "DIM Item",
            "to_column": "Item"
        },
        {
            "from_table": "Actuals1",
            "from_column": "Item",
            "to_table": "DIM Item",
            "to_column": "Item"
        },
        {
            "from_table": "Target2",
            "from_column": "Product REF",
            "to_table": "DIM Product Ref",
            "to_column": "Product REF"
        },
        {
            "from_table": "Actuals1",
            "from_column": "Product REF",
            "to_table": "DIM Product Ref",
            "to_column": "Product REF"
        },
        {
            "from_table": "Actuals1",
            "from_column": "Channel",
            "to_table": "DIM Channel",
            "to_column": "Channel"
        },
        {
            "from_table": "Target2",
            "from_column": "Item",
            "to_table": "Item Actuals",
            "to_column": "Item"
        },
        {
            "from_table": "Actuals1",
            "from_column": "Item",
            "to_table": "Item Actuals",
            "to_column": "Item"
        },
        {
            "from_table": "Actuals1",
            "from_column": "date",
            "to_table": "Calendar Table",
            "to_column": "Date"
        },
        {
            "from_table": "Target2",
            "from_column": "date",
            "to_table": "Calendar Table",
            "to_column": "Date"
        }
    ]
}