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: DimArticulo
|   Id_Articulo | Descripcion                    | Codigo   | ColorBase   | ColorDerivado   | UMD   | Tipo         | Grupo     |
|--------------:|:-------------------------------|:---------|:------------|:----------------|:------|:-------------|:----------|
|          4545 | BROCHA 1/2                     | B1/2     | OTRO        | N/A             | PIEZA | COMPLEMENTOS | BROCHAS   |
|          4546 | BROCHA 1                       | B1       | OTRO        | N/A             | PIEZA | COMPLEMENTOS | BROCHAS   |
|          4547 | BROCHA 1 1/2                   | B11/2    | OTRO        | N/A             | PIEZA | COMPLEMENTOS | BROCHAS   |
|          4548 | BROCHA PERFECT SERIE 392 DE 2  | B2       | OTRO        | N/A             | PIEZA | COMPLEMENTOS | BROCHAS   |
|          4549 | BROCHA 2 1/2                   | B21/2    | OTRO        | N/A             | PIEZA | COMPLEMENTOS | BROCHAS   |
|          4550 | BROCHA 3                       | B3       | OTRO        | N/A             | PIEZA | COMPLEMENTOS | BROCHAS   |
|          4551 | BROCHA 4                       | B4       | OTRO        | N/A             | PIEZA | COMPLEMENTOS | BROCHAS   |
|          4552 | BROCHA  PERFECT 392 DE 5       | B5       | OTRO        | N/A             | PIEZA | COMPLEMENTOS | BROCHAS   |
|          4553 | BROCHA 6                       | B6       | OTRO        | N/A             | PIEZA | COMPLEMENTOS | BROCHAS   |
|          4554 | MANERAL PARA RODILLO 4 ALAMRES | MANERAL4 | OTRO        | N/A             | PIEZA | COMPLEMENTOS | MANERALES |


Table: DimCliente
|   Id_cliente | RazonSocial                     | Colonia     |    CP | Ciudad      | Estado   | Pais   |   CodigoPostal |
|-------------:|:--------------------------------|:------------|------:|:------------|:---------|:-------|---------------:|
|         3726 | Abonís destarotaré CB           | Agua Blanca | 45427 | Tlaquepaque | Jalisco  | México |          45427 |
|         3727 | Abraham Lincoln                 | Agua Blanca | 45427 | Tlaquepaque | Jalisco  | México |          45427 |
|         3730 | Adelaide Coombes                | Agua Blanca | 45427 | Tlaquepaque | Jalisco  | México |          45427 |
|         3732 | Agustina Banda Vellon           | Agua Blanca | 45427 | Tlaquepaque | Jalisco  | México |          45427 |
|         3733 | Ahmad Shah Masoud National Hero | Agua Blanca | 45427 | Tlaquepaque | Jalisco  | México |          45427 |
|         3737 | Airam Bernaldo Caride           | Agua Blanca | 45427 | Tlaquepaque | Jalisco  | México |          45427 |
|         3738 | Akilah Thomson                  | Agua Blanca | 45427 | Tlaquepaque | Jalisco  | México |          45427 |
|         3739 | Alan Naves Sotres               | Agua Blanca | 45427 | Tlaquepaque | Jalisco  | México |          45427 |
|         3743 | Alethia Bishop                  | Agua Blanca | 45427 | Tlaquepaque | Jalisco  | México |          45427 |
|         3744 | Alex Pettyfer                   | Agua Blanca | 45427 | Tlaquepaque | Jalisco  | México |          45427 |


Table: DimComprador
|   Id_comprador | Nombre   |
|---------------:|:---------|
|              9 | Carlos   |
|             10 | Raúl     |
|             11 | Ramón    |
|             12 | Marco    |
|             13 | Oswaldo  |


Table: DimProveedor
|   Id_proveedor | RazonSocial   | Colonia                | Ciudad      | Estado   | Pais   |   CodigoPostal |
|---------------:|:--------------|:-----------------------|:------------|:---------|:-------|---------------:|
|             88 | A             | Fracc. Ind. E Rosariol | Guadalajara | Jalisco  | México |          44890 |
|             89 | B             | PARAISOS DEL COLLI     | Zapopan     | Jalisco  | México |          45080 |
|             90 | C             | TONALA                 | Guadalajara | Jalisco  | México |          44360 |
|             91 | D             | EL SAUZ                | Guadalajara | Jalisco  | México |          44980 |
|             92 | E             | PARAISOS DEL COLLI     | Guadalajara | Jalisco  | México |          44260 |
|             93 | F             | TONALA                 | Zapopan     | Jalisco  | México |          45200 |
|             94 | G             | PARAISOS DEL COLLI     | Guadalajara | Jalisco  | México |          44440 |
|             95 | H             | PARAISOS DEL COLLI     | Guadalajara | Jalisco  | México |          44440 |
|             96 | I             | TONALA                 | Zapopan     | Jalisco  | México |          45145 |
|             97 | J             | EL SAUZ                | Guadalajara | Jalisco  | México |          44300 |


Table: DimSubCompra
|   Id_compra |    Folio | FormaPago   |
|------------:|---------:|:------------|
|         114 | 83048794 | 30 Dias     |
|         115 | 83048795 | 30 Dias     |
|         116 | 83048797 | 30 Dias     |
|         117 | 83047830 | 30 Dias     |
|         120 | 83049443 | 30 Dias     |
|         121 | 83049447 | 30 Dias     |
|         125 | 83050431 | 30 Dias     |
|         131 | 83051911 | 30 Dias     |
|         132 | 83051926 | 30 Dias     |
|         133 | 83051928 | 30 Dias     |


Table: DimSubFactura
|   Id_Factura |   Folio | CondicionPago   |
|-------------:|--------:|:----------------|
|          762 |    3638 | CONTADO 100%    |
|          763 |    3639 | CONTADO 100%    |
|          764 |    3640 | CONTADO 100%    |
|          766 |    3642 | CONTADO 100%    |
|          771 |    3646 | CONTADO 100%    |
|          772 |    3647 | CONTADO 100%    |
|          774 |    3648 | CONTADO 100%    |
|          776 |    3650 | CONTADO 100%    |
|          777 |    3651 | CONTADO 100%    |
|          778 |    3652 | CONTADO 100%    |


Table: DimTiempo
|   Id_tiempo |   Anio |   Trimestre |   Semestre |   Mes |   Dia | NombreMes   | NombreDia   | Date                    |
|------------:|-------:|------------:|-----------:|------:|------:|:------------|:------------|:------------------------|
|    20091001 |   2009 |           4 |          2 |    10 |     1 | October     | Thursday    | 2009-10-01 00:00:00.000 |
|    20091002 |   2009 |           4 |          2 |    10 |     2 | October     | Friday      | 2009-10-02 00:00:00.000 |
|    20091003 |   2009 |           4 |          2 |    10 |     3 | October     | Saturday    | 2009-10-03 00:00:00.000 |
|    20091004 |   2009 |           4 |          2 |    10 |     4 | October     | Sunday      | 2009-10-04 00:00:00.000 |
|    20091006 |   2009 |           4 |          2 |    10 |     6 | October     | Tuesday     | 2009-10-06 00:00:00.000 |
|    20091007 |   2009 |           4 |          2 |    10 |     7 | October     | Wednesday   | 2009-10-07 00:00:00.000 |
|    20091008 |   2009 |           4 |          2 |    10 |     8 | October     | Thursday    | 2009-10-08 00:00:00.000 |
|    20091009 |   2009 |           4 |          2 |    10 |     9 | October     | Friday      | 2009-10-09 00:00:00.000 |
|    20091011 |   2009 |           4 |          2 |    10 |    11 | October     | Sunday      | 2009-10-11 00:00:00.000 |
|    20091012 |   2009 |           4 |          2 |    10 |    12 | October     | Monday      | 2009-10-12 00:00:00.000 |


Table: DimVendedor
|   Id_Vendedor | Nombre    |
|--------------:|:----------|
|            20 | Francisco |
|            21 | Fernando  |
|            22 | Iván      |
|            23 | Álvaro    |
|            24 | Óscar     |


Table: FactCompra
|   #cantidad_compra |   #total |   #cantidad_articulos |   #subtotal |   #descuento |   #IVA |   Id_tiempo |   Id_articulo |   Id_proveedor |   Id_comprador |   Id_compra |   #precio |
|-------------------:|---------:|----------------------:|------------:|-------------:|-------:|------------:|--------------:|---------------:|---------------:|------------:|----------:|
|           0.5      |        0 |                    20 |           0 |            0 |      0 | 2.01004e+07 |          4676 |             88 |              9 |         139 |         0 |
|           0.5      |        0 |                     1 |           0 |            0 |      0 | 2.01411e+07 |          4676 |             88 |              9 |         142 |         0 |
|           0.5      |        0 |                     5 |           0 |            0 |      0 | 2.01803e+07 |          4676 |             88 |              9 |         144 |         0 |
|           0.355263 |        0 |                    27 |           0 |            0 |      0 | 2.01103e+07 |          4676 |             88 |              9 |         146 |         0 |
|           0.5      |        0 |                    15 |           0 |            0 |      0 | 2.01801e+07 |          4676 |             88 |              9 |         147 |         0 |
|           0.5      |        0 |                     3 |           0 |            0 |      0 | 2.01908e+07 |          4676 |             88 |              9 |         149 |         0 |
|           0.441176 |        0 |                    15 |           0 |            0 |      0 | 2.01004e+07 |          4676 |             88 |              9 |         152 |         0 |
|           0.381579 |        0 |                    29 |           0 |            0 |      0 | 2.01901e+07 |          4676 |             88 |              9 |         153 |         0 |
|           0.5      |        0 |                    34 |           0 |            0 |      0 | 2.01605e+07 |          4676 |             88 |              9 |         154 |         0 |
|           0.5      |        0 |                    15 |           0 |            0 |      0 | 2.01602e+07 |          4676 |             88 |              9 |         155 |         0 |


Table: FactSales
|   #num_fact |   #num_articulos |   #total |   #subtotal |   #descuento |   #IVA |   Id_tiempo |   Id_articulo |   Id_vendedor |   Id_factura |   Id_cliente |   #precio |
|------------:|-----------------:|---------:|------------:|-------------:|-------:|------------:|--------------:|--------------:|-------------:|-------------:|----------:|
|           1 |                1 |    55.48 |       47.83 |            0 |   7.65 | 2.01607e+07 |          4241 |            24 |         7140 |         4029 |     47.83 |
|           1 |                1 |   271    |      235.65 |            0 |  35.35 | 2.01607e+07 |          4383 |            24 |         3834 |         4029 |    235.65 |
|           1 |                1 |    38.01 |       33.05 |            0 |   4.96 | 2.01608e+07 |          4620 |            24 |         4061 |         4029 |     33.05 |
|           1 |                1 |    82    |       70.69 |            0 |  11.31 | 2.01608e+07 |          4416 |            24 |         6477 |         4029 |     70.69 |
|           1 |                1 |    96    |       83.48 |            0 |  12.52 | 2.01608e+07 |          4705 |            24 |         2335 |         4029 |     83.48 |
|           1 |                1 |    64.01 |       55.66 |            0 |   8.35 | 2.01608e+07 |          4315 |            24 |         2904 |         4029 |     55.66 |
|           1 |                1 |    46    |       40    |            0 |   6    | 2.01608e+07 |          4579 |            24 |         2584 |         4029 |     40    |
|           1 |                1 |    42.01 |       36.53 |            0 |   5.48 | 2.01609e+07 |          4615 |            24 |         2720 |         4029 |     36.53 |
|           1 |                1 |    38.01 |       33.05 |            0 |   4.96 | 2.01609e+07 |          4618 |            24 |         3284 |         4029 |     33.05 |
|           1 |                1 |    28    |       24.35 |            0 |   3.65 | 2.01609e+07 |          4639 |            24 |         1703 |         4029 |     24.35 |

 


tables: name: DimArticulo
data: DimArticulo.csv
name: DimCliente
data: DimCliente.csv
name: DimComprador
data: DimComprador.csv
name: DimProveedor
data: DimProveedor.csv
name: DimSubCompra
data: DimSubCompra.csv
name: DimSubFactura
data: DimSubFactura.csv
name: DimTiempo
data: DimTiempo.csv
name: DimVendedor
data: DimVendedor.csv
name: FactCompra
data: FactCompra.csv
name: FactSales
data: FactSales.csv
label: FactCompra
Id_articulo
DimArticulo
Id_Articulo
FactSales
Id_articulo
DimArticulo
Id_Articulo
FactSales
Id_cliente
DimCliente
Id_cliente
FactCompra
Id_comprador
DimComprador
Id_comprador
FactCompra
Id_proveedor
DimProveedor
Id_proveedor
FactCompra
Id_compra
DimSubCompra
Id_compra
FactSales
Id_factura
DimSubFactura
Id_Factura
FactCompra
Id_tiempo
DimTiempo
Id_tiempo
FactSales
Id_tiempo
DimTiempo
Id_tiempo
FactSales
Id_vendedor
DimVendedor
Id_Vendedor
output: {
    "joins": [
        {
            "from_table": "FactCompra",
            "from_column": "Id_articulo",
            "to_table": "DimArticulo",
            "to_column": "Id_Articulo"
        },
        {
            "from_table": "FactSales",
            "from_column": "Id_articulo",
            "to_table": "DimArticulo",
            "to_column": "Id_Articulo"
        },
        {
            "from_table": "FactSales",
            "from_column": "Id_cliente",
            "to_table": "DimCliente",
            "to_column": "Id_cliente"
        },
        {
            "from_table": "FactCompra",
            "from_column": "Id_comprador",
            "to_table": "DimComprador",
            "to_column": "Id_comprador"
        },
        {
            "from_table": "FactCompra",
            "from_column": "Id_proveedor",
            "to_table": "DimProveedor",
            "to_column": "Id_proveedor"
        },
        {
            "from_table": "FactCompra",
            "from_column": "Id_compra",
            "to_table": "DimSubCompra",
            "to_column": "Id_compra"
        },
        {
            "from_table": "FactSales",
            "from_column": "Id_factura",
            "to_table": "DimSubFactura",
            "to_column": "Id_Factura"
        },
        {
            "from_table": "FactCompra",
            "from_column": "Id_tiempo",
            "to_table": "DimTiempo",
            "to_column": "Id_tiempo"
        },
        {
            "from_table": "FactSales",
            "from_column": "Id_tiempo",
            "to_table": "DimTiempo",
            "to_column": "Id_tiempo"
        },
        {
            "from_table": "FactSales",
            "from_column": "Id_vendedor",
            "to_table": "DimVendedor",
            "to_column": "Id_Vendedor"
        }
    ]
}