
 Usage: dataio convert [OPTIONS] {source} {target}

 Read a table from SOURCE and write it to TARGET; report both sides.

 Options both sides have take --in- (the source) or --out- (the target).
 --query is SQL over the source whose result is written: inside a base
 it names its tables, over any other source the table is data.
 With --dry-run the report comes back and nothing is written.
 A TARGET that is the SOURCE itself, or a sheet with rows of a Google
 spreadsheet that the write replaces, asks first: --confirm skips the question.
 An address of many sources (a mask, a folder, a list) is read as one table:
 --source-column names the column with the source of each row, --strict makes
 different columns fail with SCHEMA_MISMATCH. A TARGET with {column} or {n} splits
 the table (--split-by, --chunk-rows, --drop-split-column). A batch reports its
 targets; --keep-going goes on after a failure and lists the errors (exit 1).
 Sources that would be written to one target (a/x.csv, b/x.csv for {stem}) are refused first.
 The action of SCHEMA_MISMATCH and TARGET_EXISTS names the flag to change (--strict, --mode).
 --columns lists the source columns the target keeps, in this order; --rename
 gives kept columns new names as old=new (the selection comes first). Both take a
 comma list and repeat; a wrong name or a clash is INVALID_ARGUMENTS (exit 2).
 --start and --value-input place and pass the values in a sheet of a service.
 SOURCE - is stdin, its format comes from the content; TARGET - is stdout:
 CSV, one value per line for one column, or --out-format; under --json the
 data is inside the envelope as data.

 Example: dataio convert a.csv b.csv --json

╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────╮
│ *    source      <str>  Address of the source, e.g. a.csv, book.xlsx#Sheet1, gsheet://ID#Sheet1  │
│                         or an https URL; - is stdin.                                             │
│                         [required]                                                               │
│ *    target      <str>  Address of the target, e.g. b.csv or gsheet://ID#Sheet1; - is stdout.    │
│                         [required]                                                               │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --in-format                                      <str>                   Source: Format name;    │
│                                                                          wins over the extension │
│                                                                          (see the formats        │
│                                                                          command).               │
│ --in-sheet                                       <str>                   Source: Sheet name;     │
│                                                                          wins over the part of   │
│                                                                          the address after #.    │
│ --in-table                                       <str>                   Source: Table name;     │
│                                                                          wins over the part of   │
│                                                                          the address after #.    │
│ --in-encoding                                    <str>                   Source: Text encoding,  │
│                                                                          e.g. utf-8 or cp1251.   │
│ --in-sep                                         <str>                   Source: Field           │
│                                                                          delimiter, e.g. ';' or  │
│                                                                          '|'.                    │
│ --in-header            --no-in-header                                    Source: The first row   │
│                                                                          holds the column names. │
│                                                                          [default: in-header]    │
│ --in-credentials                                 <str>                   Source: Key file (JSON) │
│                                                                          of the service, e.g. a  │
│                                                                          Google service-account  │
│                                                                          key; default: the       │
│                                                                          standard order.         │
│ --as-text              --no-as-text                                      Read every value as     │
│                                                                          text.                   │
│                                                                          [default: no-as-text]   │
│ --dtypes                                         COLUMN=TYPE             Type of one column as   │
│                                                                          COLUMN=TYPE, e.g.       │
│                                                                          freq=int; repeatable.   │
│ --limit                                          <int range> [x>=0]      Read at most this many  │
│                                                                          rows.                   │
│ --query                                          <str>                   SQL whose result is     │
│                                                                          read: inside a base its │
│                                                                          tables, over any other  │
│                                                                          source the table data.  │
│ --source-column                                  <str>                   Column that names the   │
│                                                                          source of each row when │
│                                                                          an address names many   │
│                                                                          sources.                │
│                                                                          [default: _source]      │
│ --strict               --no-strict                                       Sources with different  │
│                                                                          columns fail with       │
│                                                                          SCHEMA_MISMATCH instead │
│                                                                          of merging as a union.  │
│                                                                          [default: no-strict]    │
│ --out-format                                     <str>                   Target: Format name;    │
│                                                                          wins over the extension │
│                                                                          (see the formats        │
│                                                                          command).               │
│ --out-sheet                                      <str>                   Target: Sheet name;     │
│                                                                          wins over the part of   │
│                                                                          the address after #.    │
│ --out-table                                      <str>                   Target: Table name;     │
│                                                                          wins over the part of   │
│                                                                          the address after #.    │
│ --out-encoding                                   <str>                   Target: Text encoding,  │
│                                                                          e.g. utf-8 or cp1251.   │
│ --out-sep                                        <str>                   Target: Field           │
│                                                                          delimiter, e.g. ';' or  │
│                                                                          '|'.                    │
│ --out-header           --no-out-header                                   Target: The first row   │
│                                                                          holds the column names. │
│                                                                          [default: out-header]   │
│ --out-credentials                                <str>                   Target: Key file (JSON) │
│                                                                          of the service, e.g. a  │
│                                                                          Google service-account  │
│                                                                          key; default: the       │
│                                                                          standard order.         │
│ --mode                                           <replace|append|error>  Write mode: what to do  │
│                                                                          with the data the       │
│                                                                          target already has.     │
│                                                                          [default: replace]      │
│ --start                                          <str>                   Top-left cell of the    │
│                                                                          table in a sheet of a   │
│                                                                          service, e.g. A5        │
│                                                                          (default A1).           │
│ --value-input                                    <raw|user>              How a sheet of a        │
│                                                                          service takes the       │
│                                                                          values: raw as they     │
│                                                                          are, user as if typed.  │
│                                                                          [default: raw]          │
│ --columns                                        COLUMN                  Source columns the      │
│                                                                          target keeps, in this   │
│                                                                          order; a comma list,    │
│                                                                          repeatable.             │
│ --rename                                         OLD=NEW                 New name of a kept      │
│                                                                          column as old=new,      │
│                                                                          applied after           │
│                                                                          --columns; a comma      │
│                                                                          list, repeatable.       │
│ --profile                                        <str>                   Write profile, e.g.     │
│                                                                          excel.                  │
│ --overwrite            --no-overwrite                                    Allow a write over the  │
│                                                                          source itself, or a     │
│                                                                          replace of a sheet with │
│                                                                          rows that asks first.   │
│                                                                          [default: no-overwrite] │
│ --backup               --no-backup                                       Keep a backup of the    │
│                                                                          target before it is     │
│                                                                          replaced.               │
│                                                                          [default: backup]       │
│ --split-by                                       <str>                   Column whose values     │
│                                                                          split the table into    │
│                                                                          one target each, in a   │
│                                                                          target with {column}.   │
│ --chunk-rows                                     <int range> [x>=1]      Rows per part, in a     │
│                                                                          target with {n}.        │
│ --drop-split-column    --no-drop-split-column                            Leave the --split-by    │
│                                                                          column out of the       │
│                                                                          targets.                │
│                                                                          [default:               │
│                                                                          no-drop-split-column]   │
│ --keep-going           --no-keep-going                                   Go on after a failed    │
│                                                                          target; the report      │
│                                                                          lists the failures in   │
│                                                                          errors.                 │
│                                                                          [default:               │
│                                                                          no-keep-going]          │
│ --dry-run                                                                Show what would happen  │
│                                                                          without making changes. │
│ --confirm                                                                Confirm a destructive   │
│                                                                          action (required        │
│                                                                          together with           │
│                                                                          --non-interactive).     │
│ --json                                                                   Emit machine-readable   │
│                                                                          JSON output.            │
│ --quiet                                                                  Suppress non-essential  │
│                                                                          output.                 │
│ --help                                                                   Show this message and   │
│                                                                          exit.                   │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

