From 5ba0aa7644e7f71dd7e4d073bc3b2e8830707b78 Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Fri, 16 Aug 2024 15:54:01 -0400 Subject: [PATCH] fix(csvsql): Use default=1 for --min-col-len and --col-len-multiplier --- CHANGELOG.rst | 1 + csvkit/utilities/csvsql.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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):