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

Verbose mode for debugging? #50

Open
nfedyashev opened this issue Feb 5, 2020 · 1 comment
Open

Verbose mode for debugging? #50

nfedyashev opened this issue Feb 5, 2020 · 1 comment

Comments

@nfedyashev
Copy link

First of all, @diogob thanks for this fantastic and very helpful gem!

I have an idea on how this could be for new users because there is a minor issue that I faced myself.

I have pretty messy CSV files that I can not change, so I'm trying various configuration options(mapping, quotes & other configurations).

Eventually, I came up with proper config but each iteration was rather painful because I couldn't understand what's the actual SQL command that's being generated.

I haven't checked the source code but all exceptions were rather cryptic, short/truncated and without full stack trace.

A few examples:

        1: from app/models/public_model.rb:12:in `import'
PG::SyntaxError (ERROR:  zero-length delimited identifier at or near """")
LINE 1: COPY "public_models" ("","","","","","","","","","","","",""...
                              ^
        1: from app/models/public_model.rb:12:in `import'
ArgumentError (invalid byte sequence in UTF-8)
        1: from app/models/public_model.rb:12:in `import'
NoMethodError (private method `gets' called for #<Pathname:/app/dumps/models.csv>)
@diogob
Copy link
Owner

diogob commented Feb 8, 2020

@nfedyashev thanks, this are good points. I haven't worked in this project in a while, but I'll keep this issue open to keep it in mind for future work.
Having said that, feel free to send PRs to address these issues, I would gladly help you get it merged.

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