Skip to content

sqlite-utils insert --convert option #356

@simonw

Description

@simonw

Idea come to me while re-reading this: https://simonwillison.net/2021/Aug/6/sqlite-utils-convert/

This is a bit of a hack:

cat /tmp/log.txt | \
    jq --raw-input '{line: .}' --compact-output | \
    sqlite-utils insert /tmp/logs.db log - --nl

Would be great if you could pipe lines to insert and transform them on the way in.

A --convert python-code option, modeled after sqlite-utils convert, could do this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions