Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IgnoreFieldsCSV #2199

Open
tomstock1337 opened this issue Jan 30, 2024 · 2 comments
Open

IgnoreFieldsCSV #2199

tomstock1337 opened this issue Jan 30, 2024 · 2 comments

Comments

@tomstock1337
Copy link

I was comparing two CSV files and attempting to ignore the first column, and the last column (column 41). Column 41 only existed on CSV A and not CSV B; and the plugin was not working at all, not even first column was ignored.

Column 41 was defunct and no longer needed, so I wanted to ignore it from the old file. I had to add a dummy column to the CSV file in order for the plugin to work.

Two possible solutions:

  1. State in the plugin information that the two files need to have the same column count
  2. Allow for column numbers greater than the column count of the CSV file, and just ignore those column ignores.
@sdottaka
Copy link
Member

sdottaka commented Jan 30, 2024

The IgnoreFieldsComma prediffer plugin accepts arguments like IgnoreFieldsComma 41-, but unfortunately, both files must have the same number of columns.

If you don't mind ignoring the differences after column 41, he can extract and compare only columns 1 to 40 using the QueryCSV unpacker plugin as shown below. (The first time you use QueryCSV, a download of the q command occurs)

QueryCSV "SELECT C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40 FROM - "

image

@tomstock1337
Copy link
Author

That works as well. If the documentation were just updated to say that the columns of both files need to be the same; it might save others quite a bit of time; a it took me awhile of testing to figure out what was happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants