diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3614a01b..6aa89406 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -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 --------------------- diff --git a/csvkit/utilities/csvsql.py b/csvkit/utilities/csvsql.py index 4eecf49b..dd051c13 100644 --- a/csvkit/utilities/csvsql.py +++ b/csvkit/utilities/csvsql.py @@ -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):