Skip to content

Commit

Permalink
fix(csvsql): Use default=1 for --min-col-len and --col-len-multiplier
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Aug 16, 2024
1 parent 9c0f91b commit 5ba0aa7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Unreleased
- feat: :doc:`/scripts/csvsql` adds a :code:`--engine-option` option.
- feat: :doc:`/scripts/sql2csv` adds a :code:`--execution-option` option.
- feat: :doc:`/scripts/sql2csv` uses the ``stream_results=True`` execution option, by default, to not load all data into memory at once.
- fix: :doc:`/scripts/csvsql` uses a default value of 1 for the :code:`--min-col-len` and :code:`--col-len-multiplier` options.

2.0.1 - July 12, 2024
---------------------
Expand Down
4 changes: 2 additions & 2 deletions csvkit/utilities/csvsql.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ def add_arguments(self):
'--chunk-size', dest='chunk_size', type=int,
help='Chunk size for batch insert into the table. Requires --insert.')
self.argparser.add_argument(
'--min-col-len', dest='min_col_len', type=int,
'--min-col-len', dest='min_col_len', type=int, default=1,
help='The minimum length of text columns.')
self.argparser.add_argument(
'--col-len-multiplier', dest='col_len_multiplier', type=int,
'--col-len-multiplier', dest='col_len_multiplier', type=int, default=1,
help='Multiply the maximum column length by this multiplier to accomodate larger values in later runs.')

def main(self):
Expand Down

0 comments on commit 5ba0aa7

Please sign in to comment.