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_ANNEE
|   ANNEE |   ID_ANNEE |
|--------:|-----------:|
|    2014 |          1 |
|    2015 |          2 |


Table: DIM_DELEGATION
| DELEGATION        |   ID_DELEGATION |
|:------------------|----------------:|
| ETRANGER          |               1 |
| Ouezzane          |               2 |
| AUTRE             |               3 |
| AGADIR IDA-TANANE |               4 |
| TANGER            |               5 |
| FES-MEDINA        |               6 |
| CASABLANCA ANFA   |               7 |
| SALA ALJADIDA     |               8 |
| MARRAKECH-MEDINA  |               9 |
| SIDI KACEM        |              10 |


Table: DIM_FILIERE
|   ID_FILIERE | FILIERE   |
|-------------:|:----------|
|            1 | BCG       |
|            2 | GEGM      |
|            3 | MIPC      |


Table: DIM_MODULE
| CODE_MODULE   | INTITULE_MODULE                             | Semestre   |
|:--------------|:--------------------------------------------|:-----------|
| TLGE1104      | Circuits électriques et électroniques G     | S1         |
| TLGE1204      | Electricité G                               | S1         |
| TLGE1304      | Analyse1 G                                  | S1         |
| TLGE1404      | Algèbre1 G                                  | S1         |
| TLGE1504      | Algorithmique et Programmation 1 G          | S1         |
| TLGE1604      | LC1 G                                       | S1         |
| TLGE2204      | Mécanique du point et Optique géométrique G | S2         |
| TLGE2304      | Analyse2 G                                  | S2         |
| TLGE2404      | Algèbre2 G                                  | S2         |
| TLGE2504      | Structure de la matière G                   | S2         |


Table: DIM_RESULTAT
|   ID_RESULTAT | Résultat   |
|--------------:|:-----------|
|             1 | V          |
|             2 | NRA        |
|             3 | NV         |
|             4 | AC         |
|             5 | RAT        |
|             6 |            |
|             7 | VAD        |


Table: DIM_SESSION
|   ID_SESSION | Session   |
|-------------:|:----------|
|            1 | session 1 |
|            2 | session 2 |


Table: DIM_SEXE
| SEXE   |   ID_SEXE |
|:-------|----------:|
| M      |         1 |
| F      |         2 |


Table: DIM_TYPE_BAC
| TYPE BAC                          |   ID_TYPE_BAC |
|:----------------------------------|--------------:|
| Sciences Expérimentales           |             1 |
| Sciences Mathématiques (A)        |             2 |
| Bac Etranger                      |             3 |
| Sc. Et Techno. Electri            |             4 |
| Sciences de la Vie et de la Terre |             5 |
| Sciences Mathématiques (B)        |             6 |
| Physique Chimie                   |             7 |
| Sciences et Técnologie Mécanique  |             8 |
| Sciences Techniques               |             9 |
| Comptabilité                      |            10 |


Table: FACT_TABLE
| CODE_MODULE   |   ID_RESULTAT |   ID_SESSION |   ID_ANNEE |   ID_FILIERE | ID_TYPE_BAC   | ID_SEXE   | ID_DELEGATION   |
|:--------------|--------------:|-------------:|-----------:|-------------:|:--------------|:----------|:----------------|
| TLMP3604      |             1 |            1 |          1 |            3 |               |           |                 |
| TLMP3604      |             1 |            1 |          1 |            3 |               |           |                 |
| TLMP3604      |             1 |            1 |          1 |            3 |               |           |                 |
| TLMP3604      |             1 |            1 |          1 |            3 |               |           |                 |
| TLMP3604      |             1 |            1 |          1 |            3 |               |           |                 |
| TLMP3604      |             1 |            1 |          1 |            3 |               |           |                 |
| TLMP3604      |             1 |            1 |          1 |            3 |               |           |                 |
| TLMP3604      |             1 |            1 |          1 |            3 |               |           |                 |
| TLMP3604      |             1 |            1 |          1 |            3 |               |           |                 |
| TLMP3604      |             1 |            1 |          1 |            3 |               |           |                 |

 


tables: name: DIM_ANNEE
data: DIM_ANNEE.csv
name: DIM_DELEGATION
data: DIM_DELEGATION.csv
name: DIM_FILIERE
data: DIM_FILIERE.csv
name: DIM_MODULE
data: DIM_MODULE.csv
name: DIM_RESULTAT
data: DIM_RESULTAT.csv
name: DIM_SESSION
data: DIM_SESSION.csv
name: DIM_SEXE
data: DIM_SEXE.csv
name: DIM_TYPE_BAC
data: DIM_TYPE_BAC.csv
name: FACT_TABLE
data: FACT_TABLE.csv
label: FACT_TABLE
ID_ANNEE
DIM_ANNEE
ID_ANNEE
FACT_TABLE
ID_FILIERE
DIM_FILIERE
ID_FILIERE
FACT_TABLE
ID_RESULTAT
DIM_RESULTAT
ID_RESULTAT
FACT_TABLE
ID_TYPE_BAC
DIM_TYPE_BAC
ID_TYPE_BAC
FACT_TABLE
ID_SEXE
DIM_SEXE
ID_SEXE
FACT_TABLE
ID_DELEGATION
DIM_DELEGATION
ID_DELEGATION
FACT_TABLE
CODE_MODULE
DIM_MODULE
CODE_MODULE
FACT_TABLE
ID_SESSION
DIM_SESSION
ID_SESSION
output: {
    "joins": [
        {
            "from_table": "FACT_TABLE",
            "from_column": "ID_ANNEE",
            "to_table": "DIM_ANNEE",
            "to_column": "ID_ANNEE"
        },
        {
            "from_table": "FACT_TABLE",
            "from_column": "ID_FILIERE",
            "to_table": "DIM_FILIERE",
            "to_column": "ID_FILIERE"
        },
        {
            "from_table": "FACT_TABLE",
            "from_column": "ID_RESULTAT",
            "to_table": "DIM_RESULTAT",
            "to_column": "ID_RESULTAT"
        },
        {
            "from_table": "FACT_TABLE",
            "from_column": "ID_TYPE_BAC",
            "to_table": "DIM_TYPE_BAC",
            "to_column": "ID_TYPE_BAC"
        },
        {
            "from_table": "FACT_TABLE",
            "from_column": "ID_SEXE",
            "to_table": "DIM_SEXE",
            "to_column": "ID_SEXE"
        },
        {
            "from_table": "FACT_TABLE",
            "from_column": "ID_DELEGATION",
            "to_table": "DIM_DELEGATION",
            "to_column": "ID_DELEGATION"
        },
        {
            "from_table": "FACT_TABLE",
            "from_column": "CODE_MODULE",
            "to_table": "DIM_MODULE",
            "to_column": "CODE_MODULE"
        },
        {
            "from_table": "FACT_TABLE",
            "from_column": "ID_SESSION",
            "to_table": "DIM_SESSION",
            "to_column": "ID_SESSION"
        }
    ]
}