Csvs-to-sqlite

Latest version: v1.3

Safety actively analyzes 621064 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.9

----------------
- Support for loading CSVs directly from URLs, thanks betatim - 38
- New -pk/--primary-key options, closes 22
- Create FTS index for extracted column values
- Added --no-fulltext-fks option, closes 32
- Now using black for code formatting
- Bumped versions of dependencies

0.8.1

------------------
- Updated README and CHANGELOG, tweaked --help output

0.8

----------------
- `-d` and `-df` options for specifying date/datetime columns, closes 33
- Maintain lookup tables in SQLite, refs 17
- `--index` option to specify which columns to index, closes 24
- Test confirming `--shape` and `--filename-column` and `-c` work together 25
- Use usecols when loading CSV if shape specified
- `--filename-column` is now compatible with `--shape`, closes 10
- `--no-index-fks` option

By default, csvs-to-sqlite creates an index for every foreign key column that is
added using the `--extract-column` option.

For large tables, this can dramatically increase the size of the resulting
database file on disk. The new `--no-index-fks` option allows you to disable
this feature to save on file size.

Refs 24 which will allow you to explicitly list which columns SHOULD have
an index created.
- Added `--filename-column` option, refs 10
- Fixes for Python 2, refs 25
- Implemented new `--shape` option - refs 25
- `--table` option for specifying table to write to, refs 10
- Updated README to cover `--skip-errors`, refs 20
- Add `--skip-errors` option (20) [Jani Monoses]
- Less verbosity (19) [Jani Monoses]

Only log `extract_columns` info when that option is passed.
- Add option for field quoting behaviour (15) [Jani Monoses]

0.7

----------------
- Add -s option to specify input field separator (13) [Jani Monoses]

0.6.1

------------------
- -f and -c now work for single table multiple columns.

Fixes 12

0.6

----------------
- `--fts` and `--extract-column` now cooperate.

If you extract a column and then specify that same column in the `--fts` list,
`csvs-to-sqlite` now uses the original value of that column in the index.

Example using CSV from https://data.sfgov.org/City-Infrastructure/Street-Tree-List/tkzw-k3nq

csvs-to-sqlite Street_Tree_List.csv trees-fts.db \
-c qLegalStatus -c qSpecies -c qSiteInfo \
-c PlantType -c qCaretaker -c qCareAssistant \
-f qLegalStatus -f qSpecies -f qAddress \
-f qSiteInfo -f PlantType -f qCaretaker \
-f qCareAssistant -f PermitNotes

Closes 9
- Added `--fts` option for setting up SQLite full-text search.

The `--fts` option will create a corresponding SQLite FTS virtual table, using
the best available version of the FTS module.

https://sqlite.org/fts5.html
https://www.sqlite.org/fts3.html

Usage:

csvs-to-sqlite my-csv.csv output.db -f column1 -f column2

Example generated with this option: https://sf-trees-search.now.sh/

Example search: https://sf-trees-search.now.sh/sf-trees-search-a899b92?sql=select+*+from+Street_Tree_List+where+rowid+in+%28select+rowid+from+Street_Tree_List_fts+where+Street_Tree_List_fts+match+%27grove+london+dpw%27%29%0D%0A

Will be used in https://github.com/simonw/datasette/issues/131
- Handle column names with spaces in them.
- Added `csvs-to-sqlite --version` option.

Using http://click.pocoo.org/5/api/#click.version_option

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.