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: DIMARENEG
| Business Area           |   Business Area ID |
|:------------------------|-------------------:|
| BU                      |                  1 |
| Services                |                  2 |
| Office & Administrative |                  3 |
| Infrastructure          |                  4 |
| R&D                     |                  5 |
| Manufacturing           |                  6 |
| Distribution            |                  7 |


Table: DIMARETIN
| IT Area    | IT Sub Area           |   IT Sub Area ID |
|:-----------|:----------------------|-----------------:|
| BU Support | Distribution          |                3 |
| BU Support | Development           |                7 |
| BU Support | Core                  |                8 |
| BU Support | Emerging              |                9 |
| BU Support | Planning              |               21 |
| BU Support | Manufacturing         |               22 |
| BU Support | Production            |               28 |
| BU Support | R&D                   |               33 |
| Enablement | Business Intelligence |                4 |
| Enablement | Data Management       |                6 |


Table: DIMCEN
| Scenario   |   Scenario ID | ScenarioDescription   |
|:-----------|--------------:|:----------------------|
| Actual     |             1 | Actual                |
| LE1        |             2 | Latest Estimate 1     |
| LE2        |             3 | Latest Estimate 2     |
| LE3        |             4 | Latest Estimate 3     |
| Plan       |             5 | Plan                  |


Table: DIMELECTO
| Cost element name        | Cost Element Group   | Cost Element Sub Group   |   Cost Element ID |
|:-------------------------|:---------------------|:-------------------------|------------------:|
| 3rd Party Marketing Data | Other                | Other                    |               182 |
| Advertising              | Other                | Other                    |                 7 |
| Audit Fees               | Other                | Other                    |                10 |
| Bank Charges             | Other                | Other                    |                12 |
| Business Gifts           | Other                | Other                    |                13 |
| Business Gifts (Other)   | Other                | Other                    |                14 |
| Charitable Contributions | Other                | Other                    |                21 |
| Conferences              | Other                | Other                    |               218 |
| Customer Channel         | Other                | Other                    |                41 |
| Customer Events          | Other                | Other                    |                40 |


Table: DIMPAS
| Sales Region   | Country/Region   |   Country/Region ID |
|:---------------|:-----------------|--------------------:|
| Africa & Asia  | China            |                  10 |
| Africa & Asia  | Hong Kong SAR    |                  19 |
| Africa & Asia  | India            |                  21 |
| Africa & Asia  | Israel           |                  23 |
| Africa & Asia  | Japan            |                  25 |
| Africa & Asia  | Malaysia         |                  26 |
| Africa & Asia  | Mena             |                  27 |
| Africa & Asia  | Pakistan         |                  31 |
| Africa & Asia  | Russia           |                  37 |
| Africa & Asia  | Saudi Arabia     |                  38 |


Table: DIMTPO
| Date                    |   Year |   Period | Period_Name   |
|:------------------------|-------:|---------:|:--------------|
| 2011-01-01 00:00:00.000 |   2011 |        1 | janeiro       |
| 2011-02-01 00:00:00.000 |   2011 |        2 | fevereiro     |
| 2011-03-01 00:00:00.000 |   2011 |        3 | março         |
| 2011-04-01 00:00:00.000 |   2011 |        4 | abril         |
| 2011-05-01 00:00:00.000 |   2011 |        5 | maio          |
| 2011-06-01 00:00:00.000 |   2011 |        6 | junho         |
| 2011-07-01 00:00:00.000 |   2011 |        7 | julho         |
| 2011-08-01 00:00:00.000 |   2011 |        8 | agosto        |
| 2011-09-01 00:00:00.000 |   2011 |        9 | setembro      |
| 2011-10-01 00:00:00.000 |   2011 |       10 | outubro       |


Table: DIMVDP
| VP               |   Department |
|:-----------------|-------------:|
| Andew Lloyd      |           64 |
| Sandy Lviv       |           56 |
| Lilly Sanders    |          451 |
| Dolores Hutchins |          163 |
| Dolores Hutchins |          367 |
| Tom Sale         |          110 |
| Mort Torres      |           15 |
| Mort Torres      |           42 |
| Mort Torres      |           62 |
| Mort Torres      |           75 |


Table: FTOTIN
| Date                    |   Value |   Department |   Cost Element ID |   Country/Region ID |   Business Area ID |   IT Sub Area ID |   Scenario ID |
|:------------------------|--------:|-------------:|------------------:|--------------------:|-------------------:|-----------------:|--------------:|
| 2014-01-01 00:00:00.000 |       0 |          277 |               155 |                  50 |                  6 |               22 |             5 |
| 2014-10-01 00:00:00.000 |       0 |          277 |               155 |                  50 |                  6 |               22 |             5 |
| 2014-11-01 00:00:00.000 |       0 |          277 |               155 |                  50 |                  6 |               22 |             5 |
| 2014-12-01 00:00:00.000 |       0 |          277 |               155 |                  50 |                  6 |               22 |             5 |
| 2014-02-01 00:00:00.000 |       0 |          277 |               155 |                  50 |                  6 |               22 |             5 |
| 2014-03-01 00:00:00.000 |       0 |          277 |               155 |                  50 |                  6 |               22 |             5 |
| 2014-04-01 00:00:00.000 |       0 |          277 |               155 |                  50 |                  6 |               22 |             5 |
| 2014-05-01 00:00:00.000 |       0 |          277 |               155 |                  50 |                  6 |               22 |             5 |
| 2014-06-01 00:00:00.000 |       0 |          277 |               155 |                  50 |                  6 |               22 |             5 |
| 2014-07-01 00:00:00.000 |       0 |          277 |               155 |                  50 |                  6 |               22 |             5 |

 


tables: name: DIMARENEG
data: DIMARENEG.csv
name: DIMARETIN
data: DIMARETIN.csv
name: DIMCEN
data: DIMCEN.csv
name: DIMELECTO
data: DIMELECTO.csv
name: DIMPAS
data: DIMPAS.csv
name: DIMTPO
data: DIMTPO.csv
name: DIMVDP
data: DIMVDP.csv
name: FTOTIN
data: FTOTIN.csv
label: FTOTIN
IT Sub Area ID
DIMARETIN
IT Sub Area ID
FTOTIN
Scenario ID
DIMCEN
Scenario ID
FTOTIN
Cost Element ID
DIMELECTO
Cost Element ID
FTOTIN
Country/Region ID
DIMPAS
Country/Region ID
FTOTIN
Department
DIMVDP
Department
FTOTIN
Business Area ID
DIMARENEG
Business Area ID
FTOTIN
Date
DIMTPO
Date
output: {
    "joins": [
        {
            "from_table": "FTOTIN",
            "from_column": "IT Sub Area ID",
            "to_table": "DIMARETIN",
            "to_column": "IT Sub Area ID"
        },
        {
            "from_table": "FTOTIN",
            "from_column": "Scenario ID",
            "to_table": "DIMCEN",
            "to_column": "Scenario ID"
        },
        {
            "from_table": "FTOTIN",
            "from_column": "Cost Element ID",
            "to_table": "DIMELECTO",
            "to_column": "Cost Element ID"
        },
        {
            "from_table": "FTOTIN",
            "from_column": "Country/Region ID",
            "to_table": "DIMPAS",
            "to_column": "Country/Region ID"
        },
        {
            "from_table": "FTOTIN",
            "from_column": "Department",
            "to_table": "DIMVDP",
            "to_column": "Department"
        },
        {
            "from_table": "FTOTIN",
            "from_column": "Business Area ID",
            "to_table": "DIMARENEG",
            "to_column": "Business Area ID"
        },
        {
            "from_table": "FTOTIN",
            "from_column": "Date",
            "to_table": "DIMTPO",
            "to_column": "Date"
        }
    ]
}