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: Dimclient
|   client_SK |   client_AlternateKey | gender   | birth_date              |   district_id |
|------------:|----------------------:|:---------|:------------------------|--------------:|
|           2 |                     2 | M        | 1945-02-04 00:00:00.000 |             1 |
|          23 |                    23 | M        | 1973-05-29 00:00:00.000 |             1 |
|          28 |                    28 | M        | 1945-09-29 00:00:00.000 |             1 |
|          56 |                    59 | M        | 1957-02-18 00:00:00.000 |             1 |
|          80 |                    84 | M        | 1979-05-05 00:00:00.000 |             1 |
|          81 |                    85 | M        | 1961-08-27 00:00:00.000 |             1 |
|         101 |                   107 | M        | 1972-06-23 00:00:00.000 |             1 |
|         104 |                   112 | M        | 1935-01-25 00:00:00.000 |             1 |
|         112 |                   120 | M        | 1976-05-10 00:00:00.000 |             1 |
|         174 |                   184 | M        | 1972-06-05 00:00:00.000 |             1 |


Table: Dimdate
|   DateKey | FullDateAlternateKey    |   DayNumberOfWeek | EnglishDayNameOfWeek   |   DayNumberOfMonth |   DayNumberOfYear |   WeekNumberOfYear | EnglishMonthName   |   MonthNumberOfYear |   CalendarQuarter |   CalendarYear |   CalendarSemester |   FiscalQuarter |   FiscalYear |   FiscalSemester |
|----------:|:------------------------|------------------:|:-----------------------|-------------------:|------------------:|-------------------:|:-------------------|--------------------:|------------------:|---------------:|-------------------:|----------------:|-------------:|-----------------:|
|  19930701 | 1993-07-01 00:00:00.000 |                 5 | Thursday               |                  1 |               182 |                 27 | July               |                   7 |                 3 |           1993 |                  2 |               1 |         1994 |                1 |
|  19930702 | 1993-07-02 00:00:00.000 |                 6 | Friday                 |                  2 |               183 |                 27 | July               |                   7 |                 3 |           1993 |                  2 |               1 |         1994 |                1 |
|  19930703 | 1993-07-03 00:00:00.000 |                 7 | Saturday               |                  3 |               184 |                 27 | July               |                   7 |                 3 |           1993 |                  2 |               1 |         1994 |                1 |
|  19930704 | 1993-07-04 00:00:00.000 |                 1 | Sunday                 |                  4 |               185 |                 28 | July               |                   7 |                 3 |           1993 |                  2 |               1 |         1994 |                1 |
|  19930705 | 1993-07-05 00:00:00.000 |                 2 | Monday                 |                  5 |               186 |                 28 | July               |                   7 |                 3 |           1993 |                  2 |               1 |         1994 |                1 |
|  19930706 | 1993-07-06 00:00:00.000 |                 3 | Tuesday                |                  6 |               187 |                 28 | July               |                   7 |                 3 |           1993 |                  2 |               1 |         1994 |                1 |
|  19930707 | 1993-07-07 00:00:00.000 |                 4 | Wednesday              |                  7 |               188 |                 28 | July               |                   7 |                 3 |           1993 |                  2 |               1 |         1994 |                1 |
|  19930708 | 1993-07-08 00:00:00.000 |                 5 | Thursday               |                  8 |               189 |                 28 | July               |                   7 |                 3 |           1993 |                  2 |               1 |         1994 |                1 |
|  19930709 | 1993-07-09 00:00:00.000 |                 6 | Friday                 |                  9 |               190 |                 28 | July               |                   7 |                 3 |           1993 |                  2 |               1 |         1994 |                1 |
|  19930710 | 1993-07-10 00:00:00.000 |                 7 | Saturday               |                 10 |               191 |                 28 | July               |                   7 |                 3 |           1993 |                  2 |               1 |         1994 |                1 |


Table: Dimloan
|   loan_SK |   loan_AlternateKey |   account_id | date                    |   amount |   duration |   payments | status   | start date              | end date   |
|----------:|--------------------:|-------------:|:------------------------|---------:|-----------:|-----------:|:---------|:------------------------|:-----------|
|        20 |                5041 |          319 | 1997-07-11 00:00:00.000 |   369000 |         60 |       6150 | C        | 2021-12-31 00:00:00.000 |            |
|        22 |                5043 |          339 | 1997-12-25 00:00:00.000 |   468060 |         60 |       7801 | C        | 2021-12-31 00:00:00.000 |            |
|        23 |                5044 |          344 | 1994-12-21 00:00:00.000 |   100980 |         60 |       1683 | C        | 2021-12-31 00:00:00.000 |            |
|        26 |                5051 |          378 | 1997-10-11 00:00:00.000 |   230400 |         60 |       3840 | C        | 2021-12-31 00:00:00.000 |            |
|        31 |                5082 |          501 | 1996-10-24 00:00:00.000 |   262980 |         60 |       4383 | C        | 2021-12-31 00:00:00.000 |            |
|        35 |                5110 |          675 | 1997-04-01 00:00:00.000 |   102240 |         60 |       1704 | C        | 2021-12-31 00:00:00.000 |            |
|        43 |                5132 |          817 | 1995-02-17 00:00:00.000 |   538500 |         60 |       8975 | C        | 2021-12-31 00:00:00.000 |            |
|        47 |                5140 |          873 | 1998-02-24 00:00:00.000 |   178500 |         60 |       2975 | C        | 2021-12-31 00:00:00.000 |            |
|        49 |                5147 |          938 | 1998-05-21 00:00:00.000 |    22260 |         60 |        371 | C        | 2021-12-31 00:00:00.000 |            |
|        50 |                5148 |          940 | 1996-05-29 00:00:00.000 |   284280 |         60 |       4738 | C        | 2021-12-31 00:00:00.000 |            |


Table: Facttrans
|   trans_id |   account_SK |   loan_SK |   client_SK | date                    | type   | operation      |   amount |   balance | k_symbol   | bank   |   account |
|-----------:|-------------:|----------:|------------:|:------------------------|:-------|:---------------|---------:|----------:|:-----------|:-------|----------:|
|      30086 |           97 |         7 |         108 | 1997-08-12 00:00:00.000 | VYDAJ  | PREVOD NA UCET |     8573 |     30507 | UVER       | MN     |   9693319 |
|      30087 |           97 |         7 |         108 | 1997-09-12 00:00:00.000 | VYDAJ  | PREVOD NA UCET |     8573 |     29677 | UVER       | MN     |   9693319 |
|      30088 |           97 |         7 |         108 | 1997-10-12 00:00:00.000 | VYDAJ  | PREVOD NA UCET |     8573 |     32229 | UVER       | MN     |   9693319 |
|      30089 |           97 |         7 |         108 | 1997-11-12 00:00:00.000 | VYDAJ  | PREVOD NA UCET |     8573 |     34788 | UVER       | MN     |   9693319 |
|      30090 |           97 |         7 |         108 | 1997-12-12 00:00:00.000 | VYDAJ  | PREVOD NA UCET |     8573 |     30280 | UVER       | MN     |   9693319 |
|      30091 |           97 |         7 |         108 | 1998-01-12 00:00:00.000 | VYDAJ  | PREVOD NA UCET |     8573 |     36342 | UVER       | MN     |   9693319 |
|      30092 |           97 |         7 |         108 | 1998-02-12 00:00:00.000 | VYDAJ  | PREVOD NA UCET |     8573 |     24553 | UVER       | MN     |   9693319 |
|      30093 |           97 |         7 |         108 | 1998-03-12 00:00:00.000 | VYDAJ  | PREVOD NA UCET |     8573 |     27879 | UVER       | MN     |   9693319 |
|      30094 |           97 |         7 |         108 | 1998-04-12 00:00:00.000 | VYDAJ  | PREVOD NA UCET |     8573 |     33521 | UVER       | MN     |   9693319 |
|      30095 |           97 |         7 |         108 | 1998-05-12 00:00:00.000 | VYDAJ  | PREVOD NA UCET |     8573 |     35884 | UVER       | MN     |   9693319 |

 


tables: name: Dimclient
data: Dimclient.csv
name: Dimdate
data: Dimdate.csv
name: Dimloan
data: Dimloan.csv
name: Facttrans
data: Facttrans.csv
label: Facttrans
client_SK
Dimclient
client_SK
Facttrans
date
Dimdate
FullDateAlternateKey
Facttrans
loan_SK
Dimloan
loan_SK
output: {
    "joins": [
        {
            "from_table": "Facttrans",
            "from_column": "client_SK",
            "to_table": "Dimclient",
            "to_column": "client_SK"
        },
        {
            "from_table": "Facttrans",
            "from_column": "date",
            "to_table": "Dimdate",
            "to_column": "FullDateAlternateKey"
        },
        {
            "from_table": "Facttrans",
            "from_column": "loan_SK",
            "to_table": "Dimloan",
            "to_column": "loan_SK"
        }
    ]
}