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-age
|   age-id | age-group   |   age-min |   age-max | age-category   | m-age-combined    | dax-age-combined   |
|---------:|:------------|----------:|----------:|:---------------|:------------------|:-------------------|
|        1 | 0-4         |         0 |         4 | Baby           | 0-4 Baby          | 0-4 Baby           |
|        2 | 5-9         |         5 |         9 | Child          | 5-9 Child         | 5-9 Child          |
|        3 | 10-14       |        10 |        14 | Child          | 10-14 Child       | 10-14 Child        |
|        4 | 15-19       |        15 |        19 | Teenager       | 15-19 Teenager    | 15-19 Teenager     |
|        5 | 20-24       |        20 |        24 | Teenager       | 20-24 Teenager    | 20-24 Teenager     |
|        6 | 25-29       |        25 |        29 | Young Adult    | 25-29 Young Adult | 25-29 Young Adult  |
|        7 | 30-34       |        30 |        34 | Young Adult    | 30-34 Young Adult | 30-34 Young Adult  |
|        8 | 35-39       |        35 |        39 | Adult          | 35-39 Adult       | 35-39 Adult        |
|        9 | 40-44       |        40 |        44 | Adult          | 40-44 Adult       | 40-44 Adult        |
|       10 | 45-49       |        45 |        49 | Adult          | 45-49 Adult       | 45-49 Adult        |


Table: DIM-gender
|   gender-id | gender   |
|------------:|:---------|
|           1 | male     |
|           2 | female   |


Table: DIM-region
|   country-id | country             | region        |
|-------------:|:--------------------|:--------------|
|            4 | Afghanistan         | Asia          |
|            8 | Albania             | Europe        |
|           12 | Algeria             | Africa        |
|           24 | Angola              | Africa        |
|           28 | Antigua and Barbuda | North America |
|           32 | Argentina           | South America |
|           51 | Armenia             | Europe        |
|          533 | Aruba               | North America |
|           36 | Australia           | Oceania       |
|           31 | Azerbaijan          | Europe        |


Table: FACT-population
|   country-id |   age-id |   gender-id |   year |   population |
|-------------:|---------:|------------:|-------:|-------------:|
|            4 |       21 |           1 |   2010 |            0 |
|            8 |       21 |           1 |   2010 |            0 |
|           24 |       21 |           1 |   2010 |            0 |
|           31 |       21 |           1 |   2010 |            0 |
|           44 |       21 |           1 |   2010 |            0 |
|          112 |       21 |           1 |   2010 |            0 |
|          204 |       21 |           1 |   2010 |            0 |
|           64 |       21 |           1 |   2010 |            0 |
|          116 |       21 |           1 |   2010 |            0 |
|          148 |       21 |           1 |   2010 |            0 |

 


tables: name: DIM-age
data: DIM-age.csv
name: DIM-gender
data: DIM-gender.csv
name: DIM-region
data: DIM-region.csv
name: FACT-population
data: FACT-population.csv
label: FACT-population
age-id
DIM-age
age-id
FACT-population
gender-id
DIM-gender
gender-id
FACT-population
country-id
DIM-region
country-id
output: {
    "joins": [
        {
            "from_table": "FACT-population",
            "from_column": "age-id",
            "to_table": "DIM-age",
            "to_column": "age-id"
        },
        {
            "from_table": "FACT-population",
            "from_column": "gender-id",
            "to_table": "DIM-gender",
            "to_column": "gender-id"
        },
        {
            "from_table": "FACT-population",
            "from_column": "country-id",
            "to_table": "DIM-region",
            "to_column": "country-id"
        }
    ]
}