simonw/sqlite-transform

--output othercolumn option

Closed this issue · 2 comments

Or... I could leave the design for --multi as it is and have a separate option that can be used for the case of wanting to write the result to a single alternative output column.

--output othercolumn would work for this. I could implement that without implementing --multi at all.

Originally posted by @simonw in #4 (comment)

Documentation: https://github.com/simonw/sqlite-transform/blob/5263d4eb011c62b12cc5dab06f0122a426bd22e0/README.md#saving-the-result-to-a-separate-column

e.g.

sqlite-transform lambda my.db mytable id \
  --code 'float(value) + 0.5' \
  --output float_id \
  --output-type float

Wrote about this in my weeknotes: https://simonwillison.net/2021/Jul/21/weeknotes/