Skip to content

Commit 5ba0aa7

Browse files
committed
fix(csvsql): Use default=1 for --min-col-len and --col-len-multiplier
1 parent 9c0f91b commit 5ba0aa7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.rst

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Unreleased
55
- feat: :doc:`/scripts/csvsql` adds a :code:`--engine-option` option.
66
- feat: :doc:`/scripts/sql2csv` adds a :code:`--execution-option` option.
77
- feat: :doc:`/scripts/sql2csv` uses the ``stream_results=True`` execution option, by default, to not load all data into memory at once.
8+
- fix: :doc:`/scripts/csvsql` uses a default value of 1 for the :code:`--min-col-len` and :code:`--col-len-multiplier` options.
89

910
2.0.1 - July 12, 2024
1011
---------------------

csvkit/utilities/csvsql.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ def add_arguments(self):
8686
'--chunk-size', dest='chunk_size', type=int,
8787
help='Chunk size for batch insert into the table. Requires --insert.')
8888
self.argparser.add_argument(
89-
'--min-col-len', dest='min_col_len', type=int,
89+
'--min-col-len', dest='min_col_len', type=int, default=1,
9090
help='The minimum length of text columns.')
9191
self.argparser.add_argument(
92-
'--col-len-multiplier', dest='col_len_multiplier', type=int,
92+
'--col-len-multiplier', dest='col_len_multiplier', type=int, default=1,
9393
help='Multiply the maximum column length by this multiplier to accomodate larger values in later runs.')
9494

9595
def main(self):

0 commit comments

Comments
 (0)