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: BridgeTableProduct
| Product ID      |
|:----------------|
| Fur-Bo-10002202 |
| Fur-Bo-10002545 |
| Fur-Bo-10002613 |
| Fur-Bo-10001811 |
| Fur-Bo-10004467 |
| Fur-Bo-10004015 |
| Fur-Bo-10000112 |
| Fur-Bo-10003660 |
| Fur-Bo-10004218 |
| Fur-Bo-10002824 |


Table: dCustomer
| Customer ID   | Customer Name        |
|:--------------|:---------------------|
| AA-10315      | Alex Avila           |
| AA-10375      | Allen Armold         |
| AA-10480      | Andrew Allen         |
| AA-10645      | Anna Andreadi        |
| AB-10015      | Aaron Bergman        |
| AB-10060      | Adam Bellavance      |
| AB-10105      | Adrian Barton        |
| AB-10150      | Aimee Bixby          |
| AB-10165      | Alan Barnes          |
| AB-10255      | Alejandro Ballentine |


Table: dDate
| Date                    |   MonthNumber | Month   |   Quarter |   Year |
|:------------------------|--------------:|:--------|----------:|-------:|
| 2014-01-01 00:00:00.000 |             1 | Jan     |         1 |   2014 |
| 2014-01-02 00:00:00.000 |             1 | Jan     |         1 |   2014 |
| 2014-01-03 00:00:00.000 |             1 | Jan     |         1 |   2014 |
| 2014-01-04 00:00:00.000 |             1 | Jan     |         1 |   2014 |
| 2014-01-05 00:00:00.000 |             1 | Jan     |         1 |   2014 |
| 2014-01-06 00:00:00.000 |             1 | Jan     |         1 |   2014 |
| 2014-01-07 00:00:00.000 |             1 | Jan     |         1 |   2014 |
| 2014-01-08 00:00:00.000 |             1 | Jan     |         1 |   2014 |
| 2014-01-09 00:00:00.000 |             1 | Jan     |         1 |   2014 |
| 2014-01-10 00:00:00.000 |             1 | Jan     |         1 |   2014 |


Table: dLocation
| LOC_ID   | Country       | Region   | State      | City           |   Postal Code |
|:---------|:--------------|:---------|:-----------|:---------------|--------------:|
| LOC0465  | United States | West     | California | Anaheim        |         92804 |
| LOC0466  | United States | West     | California | Antioch        |         94509 |
| LOC0467  | United States | West     | California | Apple Valley   |         92307 |
| LOC0468  | United States | West     | California | Bakersfield    |         93309 |
| LOC0469  | United States | West     | California | Brentwood      |         94513 |
| LOC0470  | United States | West     | California | Burbank        |         91505 |
| LOC0471  | United States | West     | California | Camarillo      |         93010 |
| LOC0472  | United States | West     | California | Chico          |         95928 |
| LOC0473  | United States | West     | California | Chula Vista    |         91911 |
| LOC0474  | United States | West     | California | Citrus Heights |         95610 |


Table: dProduct
| Product ID      | Category        | Sub-Category   | Product Name                                                                                 |
|:----------------|:----------------|:---------------|:---------------------------------------------------------------------------------------------|
| OFF-PA-10003424 | Office Supplies | Paper          | "While you Were Out" Message Book, One Form per Page                                         |
| OFF-PA-10001583 | Office Supplies | Paper          | 1/4 Fold Party Design Invitations & White Envelopes, 24 8-1/2" X 11" Cards, 25 Env./Pack     |
| OFF-PA-10004381 | Office Supplies | Paper          | 14-7/8 x 11 Blue Bar Computer Printout Paper                                                 |
| OFF-PA-10003016 | Office Supplies | Paper          | Adams "While You Were Out" Message Pads                                                      |
| OFF-PA-10002713 | Office Supplies | Paper          | Adams Phone Message Book, 200 Message Capacity, 8 1/16” x 11”                                |
| OFF-PA-10000659 | Office Supplies | Paper          | Adams Phone Message Book, Professional, 400 Message Capacity, 5 3/6” x 11”                   |
| OFF-PA-10002377 | Office Supplies | Paper          | Adams Telephone Message Book W/Dividers/Space For Phone Numbers, 5 1/4"X8 1/2", 200/Messages |
| OFF-PA-10001838 | Office Supplies | Paper          | Adams Telephone Message Book W/Dividers/Space For Phone Numbers, 5 1/4"X8 1/2", 300/Messages |
| OFF-PA-10004082 | Office Supplies | Paper          | Adams Telephone Message Book w/Frequently-Called Numbers Space, 400 Messages per Book        |
| OFF-PA-10001560 | Office Supplies | Paper          | Adams Telephone Message Books, 5 1/4” x 11”                                                  |


Table: dSegment
| SEG_ID   | Segment     |
|:---------|:------------|
| SEG0001  | Consumer    |
| SEG0002  | Corporate   |
| SEG0003  | Home Office |


Table: dShipMode
| SHP_ID   | Ship Mode      |
|:---------|:---------------|
| SHP0001  | First Class    |
| SHP0002  | Same Day       |
| SHP0003  | Second Class   |
| SHP0004  | Standard Class |


Table: fTransaction
|   Trans_ID | Order ID       | Order Date              | Ship Date               | SHP_ID   | Customer ID   | SEG_ID   | LOC_ID   | Product ID      |   Sales |   Quantity |   Discount |   Profit |
|-----------:|:---------------|:------------------------|:------------------------|:---------|:--------------|:---------|:---------|:----------------|--------:|-----------:|-----------:|---------:|
|         25 | CA-2015-106320 | 2015-09-25 00:00:00.000 | 2015-09-30 00:00:00.000 | SHP0004  | EB-13870      | SEG0001  | LOC0608  | FUR-TA-10000577 | 1044.63 |          3 |          0 | 240.265  |
|         48 | CA-2016-169194 | 2016-06-20 00:00:00.000 | 2016-06-25 00:00:00.000 | SHP0004  | LH-16900      | SEG0001  | LOC0206  | TEC-AC-10002167 |   45    |          3 |          0 |   4.95   |
|         65 | CA-2015-135545 | 2015-11-24 00:00:00.000 | 2015-11-30 00:00:00.000 | SHP0004  | KM-16720      | SEG0001  | LOC0498  | OFF-PA-10003892 |  146.73 |          3 |          0 |  68.9631 |
|        118 | CA-2015-110457 | 2015-03-02 00:00:00.000 | 2015-03-06 00:00:00.000 | SHP0004  | DK-13090      | SEG0001  | LOC0627  | FUR-TA-10001768 |  787.53 |          3 |          0 | 165.381  |
|        134 | CA-2016-145583 | 2016-10-13 00:00:00.000 | 2016-10-19 00:00:00.000 | SHP0004  | LC-16885      | SEG0001  | LOC0524  | OFF-PA-10001804 |   20.04 |          3 |          0 |   9.6192 |
|        145 | CA-2017-155376 | 2017-12-22 00:00:00.000 | 2017-12-27 00:00:00.000 | SHP0004  | SG-20080      | SEG0001  | LOC0102  | OFF-AP-10001058 |  839.43 |          3 |          0 | 218.252  |
|        172 | CA-2014-118962 | 2014-08-05 00:00:00.000 | 2014-08-09 00:00:00.000 | SHP0004  | CS-12130      | SEG0001  | LOC0498  | OFF-PA-10000659 |   20.94 |          3 |          0 |   9.8418 |
|        347 | CA-2017-134306 | 2017-07-08 00:00:00.000 | 2017-07-12 00:00:00.000 | SHP0004  | TD-20995      | SEG0001  | LOC0227  | OFF-AR-10004027 |    7.56 |          3 |          0 |   3.0996 |
|        405 | CA-2017-117933 | 2017-12-24 00:00:00.000 | 2017-12-29 00:00:00.000 | SHP0004  | RF-19840      | SEG0001  | LOC0265  | OFF-AP-10004249 |   35.91 |          3 |          0 |   9.6957 |
|        479 | CA-2016-152632 | 2016-10-27 00:00:00.000 | 2016-11-02 00:00:00.000 | SHP0004  | JE-15475      | SEG0001  | LOC0271  | FUR-FU-10002671 |   40.2  |          3 |          0 |  19.296  |

 


tables: name: BridgeTableProduct
data: BridgeTableProduct.csv
name: dCustomer
data: dCustomer.csv
name: dDate
data: dDate.csv
name: dLocation
data: dLocation.csv
name: dProduct
data: dProduct.csv
name: dSegment
data: dSegment.csv
name: dShipMode
data: dShipMode.csv
name: fTransaction
data: fTransaction.csv
label: fTransaction
LOC_ID
dLocation
LOC_ID
fTransaction
SHP_ID
dShipMode
SHP_ID
fTransaction
SEG_ID
dSegment
SEG_ID
fTransaction
Customer ID
dCustomer
Customer ID
dProduct
Product ID
BridgeTableProduct
Product ID
fTransaction
Product ID
BridgeTableProduct
Product ID
output: {
    "joins": [
        {
            "from_table": "fTransaction",
            "from_column": "LOC_ID",
            "to_table": "dLocation",
            "to_column": "LOC_ID"
        },
        {
            "from_table": "fTransaction",
            "from_column": "SHP_ID",
            "to_table": "dShipMode",
            "to_column": "SHP_ID"
        },
        {
            "from_table": "fTransaction",
            "from_column": "SEG_ID",
            "to_table": "dSegment",
            "to_column": "SEG_ID"
        },
        {
            "from_table": "fTransaction",
            "from_column": "Customer ID",
            "to_table": "dCustomer",
            "to_column": "Customer ID"
        },
        {
            "from_table": "dProduct",
            "from_column": "Product ID",
            "to_table": "BridgeTableProduct",
            "to_column": "Product ID"
        },
        {
            "from_table": "fTransaction",
            "from_column": "Product ID",
            "to_table": "BridgeTableProduct",
            "to_column": "Product ID"
        }
    ]
}