Multi table add rows
In this case, we have added some new sales for the seller google.We have also added a new product.
sales has a many-to-one relationship with product.
Table sales changes
| date | product | seller | quantity |
|---|---|---|---|
| 2024-01-01 | P1 | microsoft | 20 |
| 2024-01-01 | P2 | amazon | 30 |
| 2024-01-01 | P2 | amazon | 20 |
| 2024-01-01 | P1 | 20 | |
| 2024-01-01 | P2 | 30 | |
| 2024-01-01 | P3 | 20 |
products changes
| date | product | quantity |
|---|---|---|
| 2024-01-01 | P1 | 10 |
| 2024-01-01 | P2 | 20 |
| 2024-01-01 | P3 | 30.0 |
| Table Update Detail | sales | products |
|---|---|---|
| Change type | ADD_ROWS | ADD_ROWS |
| Change Scope | sales.seller = ‘google’ | product.product = ‘P3’ |
Multi table add rows using an unknown condition
In this case, we have added new rows in sales table.All these new sales has a new seller which has been added in users table.
sales has a many-to-one relationship with users.
Table sales changes
| date | product | seller | quantity |
|---|---|---|---|
| 2024-01-01 | P1 | microsoft | 20 |
| 2024-01-01 | P2 | amazon | 30 |
| 2024-01-01 | P2 | amazon | 20 |
| 2024-01-02 | P1 | 20 | |
| 2024-01-02 | P2 | alibaba | 30 |
| 2024-01-02 | P3 | ibm | 20 |
users changes
| id | warehouse |
|---|---|
| microsoft | nyo-1 |
| amazon | chi-1 |
| tor-1 | |
| alibaba | bei-1 |
| ibm | par-1 |
IN condition.
Change description
| Table Update Detail | sales | users |
|---|---|---|
| Change type | ADD_ROWS | ADD_ROWS |
| Change Scope | sales.date = ‘2024-01-02’ | users.id in (‘google’, ‘alibaba’,‘ibm’) |
In this case you can use the unknown condition. Change description with an unknown condition
| Table Update Detail | sales | users |
|---|---|---|
| Change type | ADD_ROWS | ADD_ROWS |
| Change Scope | sales.date = ‘2024-01-02’ | Unknown condition |
If you have defined a factless hierarchy on user table, the missing link with the fact table forbid us to use the sales table scope.
Connector will full refresh on this hierarchy stream.