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: Calendar
| Date                    |
|:------------------------|
| 2021-01-01 00:00:00.000 |
| 2021-01-02 00:00:00.000 |
| 2021-01-03 00:00:00.000 |
| 2021-01-04 00:00:00.000 |
| 2021-01-05 00:00:00.000 |
| 2021-01-06 00:00:00.000 |
| 2021-01-07 00:00:00.000 |
| 2021-01-08 00:00:00.000 |
| 2021-01-09 00:00:00.000 |
| 2021-01-10 00:00:00.000 |


Table: dim Master Map
| Name         |   _RegionKey | Type     | _SkillKey   |   _PMVKey |
|:-------------|-------------:|:---------|:------------|----------:|
| Customer 412 |          652 | Customer |             |        41 |
| Customer 428 |          652 | Customer |             |        41 |
| Customer 437 |          652 | Customer |             |        41 |
| Customer 439 |          652 | Customer |             |        41 |
| Customer 440 |          652 | Customer |             |        41 |
| Customer 505 |          652 | Customer |             |        41 |
| Customer 507 |          652 | Customer |             |        41 |
| Customer 509 |          652 | Customer |             |        41 |
| Customer 513 |          652 | Customer |             |        41 |
| Customer 514 |          652 | Customer |             |        41 |


Table: dim PMV Skill Mapping
|   _PMVKey |   _SkillKey | Engineer Skill   | PMV Type   |
|----------:|------------:|:-----------------|:-----------|
|         1 |           1 | MULTI SKILLED    | ACCLET     |
|         2 |           1 | MULTI SKILLED    | ACCSRQ     |
|         4 |           1 | MULTI SKILLED    | ANSUL      |
|         5 |           1 | MULTI SKILLED    | ASSET      |
|         1 |           3 | SECURITY         | ACCLET     |
|         2 |           3 | SECURITY         | ACCSRQ     |
|         3 |           3 | SECURITY         | AFFRAY     |
|         5 |           3 | SECURITY         | ASSET      |
|         3 |           2 | COMMS            | AFFRAY     |
|         6 |           2 | COMMS            | ATTACK     |


Table: dim PMV
| PMV Type   |   _PMVKey |
|:-----------|----------:|
| ACCLET     |         1 |
| ACCSRQ     |         2 |
| AFFRAY     |         3 |
| ANSUL      |         4 |
| ASSET      |         5 |
| ATTACK     |         6 |
| BABY       |         7 |
| BARG       |         8 |
| CCT        |         9 |
| CCTLET     |        10 |


Table: dim Regions
|   _RegionKey | Region   |
|-------------:|:---------|
|          651 | Region A |
|          657 | Region B |
|          650 | Region C |
|          652 | Region D |
|          653 | Region E |
|          654 | Region F |


Table: dim Skills
|   _SkillKey | Engineer Skill     |
|------------:|:-------------------|
|           1 | MULTI SKILLED      |
|           2 | COMMS              |
|           3 | SECURITY           |
|           4 | MGX                |
|           5 | APPRENTICE         |
|           6 | TVD                |
|           7 | SMALL WORKS        |
|           8 | FIRE/EXTINGUISHERS |
|           9 | HYDRANTS           |
|          10 | FIRE               |


Table: fact Customers
|   Freq Mths |   Month# |   _PMVKey | Site Town   |   _RegionKey | Name          |
|------------:|---------:|----------:|:------------|-------------:|:--------------|
|           6 |        8 |        41 | Birmingham  |          651 | Customer 579  |
|           6 |       14 |        41 | Birmingham  |          651 | Customer 579  |
|           6 |        1 |        41 | Birmingham  |          651 | Customer 582  |
|           6 |        7 |        41 | Birmingham  |          651 | Customer 582  |
|           6 |        6 |        41 | Birmingham  |          651 | Customer 928  |
|           6 |       12 |        41 | Birmingham  |          651 | Customer 928  |
|           6 |       10 |        41 | Birmingham  |          651 | Customer 1157 |
|           6 |       16 |        41 | Birmingham  |          651 | Customer 1157 |
|           6 |       10 |        41 | Birmingham  |          651 | Customer 1463 |
|           6 |       16 |        41 | Birmingham  |          651 | Customer 1463 |


Table: fact Employees
|   Count |   _SkillKey | Name        |   _RegionKey | City       |
|--------:|------------:|:------------|-------------:|:-----------|
|       1 |           1 | Employee 1  |          651 | Belfast    |
|       1 |           1 | Employee 5  |          651 | London     |
|       1 |           1 | Employee 13 |          651 | Liverpool  |
|       1 |           2 | Employee 2  |          651 | Glasgow    |
|       1 |           2 | Employee 4  |          657 | Liverpool  |
|       1 |           2 | Employee 6  |          651 | Liverpool  |
|       1 |           2 | Employee 11 |          651 | Birmingham |
|       1 |           3 | Employee 3  |          651 | London     |
|       1 |           3 | Employee 7  |          651 | London     |
|       1 |           3 | Employee 8  |          651 | London     |

 


tables: name: Calendar
data: Calendar.csv
name: dim Master Map
data: dim Master Map.csv
name: dim PMV Skill Mapping
data: dim PMV Skill Mapping.csv
name: dim PMV
data: dim PMV.csv
name: dim Regions
data: dim Regions.csv
name: dim Skills
data: dim Skills.csv
name: fact Customers
data: fact Customers.csv
name: fact Employees
data: fact Employees.csv
label: dim PMV Skill Mapping
_SkillKey
dim Skills
_SkillKey
dim PMV Skill Mapping
_PMVKey
dim PMV
_PMVKey
fact Employees
_RegionKey
dim Regions
_RegionKey
fact Customers
_RegionKey
dim Regions
_RegionKey
dim Master Map
_RegionKey
dim Regions
_RegionKey
fact Employees
_SkillKey
dim Skills
_SkillKey
fact Customers
_PMVKey
dim PMV
_PMVKey
output: {
    "joins": [
        {
            "from_table": "dim PMV Skill Mapping",
            "from_column": "_SkillKey",
            "to_table": "dim Skills",
            "to_column": "_SkillKey"
        },
        {
            "from_table": "dim PMV Skill Mapping",
            "from_column": "_PMVKey",
            "to_table": "dim PMV",
            "to_column": "_PMVKey"
        },
        {
            "from_table": "fact Employees",
            "from_column": "_RegionKey",
            "to_table": "dim Regions",
            "to_column": "_RegionKey"
        },
        {
            "from_table": "fact Customers",
            "from_column": "_RegionKey",
            "to_table": "dim Regions",
            "to_column": "_RegionKey"
        },
        {
            "from_table": "dim Master Map",
            "from_column": "_RegionKey",
            "to_table": "dim Regions",
            "to_column": "_RegionKey"
        },
        {
            "from_table": "fact Employees",
            "from_column": "_SkillKey",
            "to_table": "dim Skills",
            "to_column": "_SkillKey"
        },
        {
            "from_table": "fact Customers",
            "from_column": "_PMVKey",
            "to_table": "dim PMV",
            "to_column": "_PMVKey"
        }
    ]
}