Skip to content

Verbose mode for debugging? #50

Open
@nfedyashev

Description

@nfedyashev

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>)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions