--ignore-leading-zeros output columns question #2424
Replies: 3 comments
-
I have created an example: file1.csv
file2.csv
command: result left-semi.csv:
issues: expected output: |
Beta Was this translation helpful? Give feedback.
-
Unfortunately, It is working as designed @datatraveller1 . I'll refactor it so that it creates temporary join columns with all the key transformations and leave the original column untouched. The temporary columns are removed after the join. WDYT? |
Beta Was this translation helpful? Give feedback.
-
Hi @jqnatividad, thank you very much, that sounds great! |
Beta Was this translation helpful? Give feedback.
-
Hi @jqnatividad, first of all, thank you very much for the new
--ignore-leading-zero
(shortcut-z
) option.It works great, but I have a question. e.g. I use:
qsv joinp -i -z --left-semi --cache-schema=-1 company_id,art_no file1.csv company_id,art_no file2.csv -o left-semi.csv
This works correctly except that the leading zeros are stripped from the output column
art_no
inleft-semi.csv
. I had hoped that stripping leadings zeros would only happen for the keys, but if the original value of art_no is01
, the value in the output file gets1
.Reading the documentation, I'm not sure what is the expected behaviour:
"
When set, joins are done ignoring leading zeros. Note that this is only applied to the join keys for both numeric and string columns. The output columns will not have leading zeros.
"If "
will not have leading zeros
" isn't a typo, the behaviour is as expected. If this should read "will not have omitted zeros
", it would be a problem. Thank you very much!Beta Was this translation helpful? Give feedback.
All reactions