nu_plugin_connectorx 0.2.0

Load data from DBs in `nushell` using ConnectorX
nu_plugin_connectorx-0.2.0 is not a library.

nu_plugin_connectorx

| crates.io |

[!WARNING] This tool might be rough around the edges, it is not widely tested.

Usage:

  > cx {flags} <uri>

Flags:

  -h, --help: Display the help message for this command
  -q, --query <string>: SQL Query to run
  -f, --sql-file <string>: File with SQL Query to run
  -p, --partition-on <string>: Column to partition the data on
  -n, --num-partitions <int>: Number of partitions to make
  -o, --output-parquet <path>: Parquet file save location, if provided no pipeline output will be produced

Parameters:

  uri <string>: ConnectorX connection URI

Input/output types:

  ╭───┬─────────┬─────────╮
  │ # │  input  │ output  │
  ├───┼─────────┼─────────┤
  │ 0 │ nothing │ nothing │
  │ 1 │ nothing │ table   │
  ╰───┴─────────┴─────────╯

Version Mapping

nushell nu_plugin_connectorx
0.111.0 0.2.0
0.110.0 0.1.0

Installation

cargo install --locked nu_plugin_connectorx

Example

Create dummy table in sqlite db,

[[a b c]; [1 2 3] [4 5 6]] | into sqlite test.db

Run query against the DB,

cx $'sqlite://("./test.db" | path expand)' -q 'select * from main'

Output,

╭───┬───┬───┬───╮
# │ a │ b │ c │
├───┼───┼───┼───┤
 0 │ 1 │ 2 │ 3 │
 1 │ 4 │ 5 │ 6 │
╰───┴───┴───┴───╯