Task
The source table stores weight and unit separately as weight and unit. Google Merchant needs one value such as 3 kg.
Short answer
Create shipping_weight from weight. If unit is g, divide the weight by 1000, then append kg.
How to Do It in Eofferix
- Open the settings of the output
shipping_weightcolumn.
The click is on the settings icon of the output shipping_weightcolumn. - In
Transformations, add conditional division for grams, then add the text suffixkgas the last rule.
The Transformationsblock shows the full rule chain for this case. - Save the column settings and go to the
Exportstep.
Before / After
Before
source data| id | title | weight | unit |
|---|---|---|---|
| GM-160 | Desk lamp | 3000 | g |
| GM-161 | Office chair | 12 | kg |
After
result| id | shipping_weight |
|---|---|
| GM-160 | 3 kg |
| GM-161 | 12 kg |