Skip to content
Discussion options

You must be logged in to vote

Hi,
a solution is to use the join verb

Running

mlr --csv join --ul \
  -j name-manufacturer \
  --rp "r_" \
  -f product-feeder.csv \
then unsparsify \
then put '${id-manufacturer}=${r_id-manufacturer}' \
then cut -x -r -f "^r_.+" \
manufacturer-feeder.csv
+---------------------+------------+-----------------------+-----------------+-------------+--------------+
| name-manufacturer   | id-product | name-product          | id-manufacturer | id-supplier | image-posted |
+---------------------+------------+-----------------------+-----------------+-------------+--------------+
| MANUFACTURER ONE    | 0          | PRODUCT A             | 114             | 0           | 0            |
| MANUF…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by rafmartom
Comment options

You must be logged in to vote
2 replies
@aborruso
Comment options

@rafmartom
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants