pgloader icon indicating copy to clipboard operation
pgloader copied to clipboard

"with" option fail when use the pgloader cli

Open thomasLeclaire opened this issue 5 years ago • 9 comments

Hi!

  • [x] pgloader --version
    pgloader version "3.6.1" (installed through brew on mac Catalina) compiled with SBCL 1.5.8

  • [x] did you test a fresh compile from the source tree? no but didn't saw any commit related.

  • [x] did you search for other similar issues? yes

  • [x] how can I reproduce the bug?

  1. show what you did : try to use the pgloader cli with options "--with xxx" pgloader --verbose --debug --type csv --encoding="ISO-8859-1" ./xxx.csv 'postgresql://user:[email protected]:54321/db?tablename=xxx' is perfectly working

pgloader --verbose --debug --type csv --with "truncate" --encoding="ISO-8859-1" ./xxx.csv 'postgresql://user:[email protected]:54321/db?tablename=xxx' is not working with error below

  1. show the result you got : #<CLOSURE (LAMBDA (COMMAND-LINE-ARGUMENTS::VALUE) :IN COMMAND-LINE-ARGUMENTS::MAKE-OPTION-ACTION) {1004D9E15B}> fell through ETYPECASE expression. Wanted one of (NULL KEYWORD SYMBOL CONS).

  2. explain how the result is not what you expected. the tool is perfectly working if I use the standard command file and call it with option truncate or other WITH ones. the cli is working perfectly if I don't specify the --with option, but as soon I add it it's not working anymore, tried truncate, csv header, skipheader,.. no one is working.

Tried also the tutorial commands here : https://pgloader.readthedocs.io/en/latest/quickstart.html which fail also with same error.

thomasLeclaire avatar Dec 06 '19 16:12 thomasLeclaire

FYI, just did a test from an Ubuntu 18.04 : the default package available on apt is only pgloader 3.5.2, and I don't have the issue.

I tryed to do a manual build (I have a lot of LISP issues related to duplicate naming), but manually manage all the errors, I can get this build
pgloader version "3.6.26cc9ca" compiled with SBCL 1.4.5.debian and exact same behavior than my mac brew installation : the cli is not working with option with but no prob if I use a dedicated command file.

regards

thomasLeclaire avatar Dec 10 '19 11:12 thomasLeclaire

Is there any update about this issue?

basilenouvellet avatar Mar 18 '20 11:03 basilenouvellet

I feel quite sure that the fix of command-line-arguments mentioned above should fix this issue. So, we need the new version of that.

  • You could for now compile yourself with a local checkout of command-line-arguments (https://github.com/fare/command-line-arguments).

  • As soon as the new version is in Quicklisp, you just need to update that and compile.

  • Hopefully the next release will also have it.

svantevonerichsen6906 avatar Mar 18 '20 22:03 svantevonerichsen6906

Do we know if release 3.6.2 is good now?

dimitri avatar Apr 03 '20 21:04 dimitri

pgloader version "3.6.2" compiled with SBCL 2.0.2 (Homebrew/Mac OS X 10.15.5)

As soon as I use the --with option (e.g. like: --with "snake_case identifiers") I get the

#<CLOSURE (LAMBDA (COMMAND-LINE-ARGUMENTS::VALUE) :IN COMMAND-LINE-ARGUMENTS::MAKE-OPTION-ACTION) {1004DBA64B}> fell through ETYPECASE expression. Wanted one of (NULL KEYWORD SYMBOL CONS).

bushd0c avatar Jun 09 '20 13:06 bushd0c

Hi @dimitri, Any update on this issue? I also use the following version and still facing this issue.

pgloader version "3.6.2" compiled with SBCL 2.0.2

ovisuru avatar Jan 05 '21 07:01 ovisuru

This error also appears if you use the --set option: pgloader --type csv --set "search_path='myschema'" "data.csv" "postgres://username:secret@db-host:5432/mydb?tablename=mytable"

Tried several variations of quoting the value for --set - no joy. I am on a mac so this uses zsh but I also tried in bash.

#<CLOSURE (LAMBDA (COMMAND-LINE-ARGUMENTS::VALUE)
            :IN
            COMMAND-LINE-ARGUMENTS::MAKE-OPTION-ACTION) {1004C7F98B}> fell through ETYPECASE expression.
Wanted one of (NULL KEYWORD SYMBOL CONS).

pgloader version "3.6.2" compiled with SBCL 2.0.11 on MacOS 11.2 installed with HomeBrew

chrisnoden avatar Feb 09 '21 14:02 chrisnoden

I feel quite sure that the fix of command-line-arguments mentioned above should fix this issue. So, we need the new version of that.

  • You could for now compile yourself with a local checkout of command-line-arguments (https://github.com/fare/command-line-arguments).
  • As soon as the new version is in Quicklisp, you just need to update that and compile.
  • Hopefully the next release will also have it.

I have exactly the same problem with version 3.6.2 on centos, install from yum postgresql repository. I'm a bit lost with the compilation process. Can you explain me with more details how to fix it. I cannot wait for 3.6.3 release. Thanks you so much to help me.

jordanebordet avatar Oct 03 '21 06:10 jordanebordet

Hi @dimitri , Any updates on this issue ? I'm facing the same issue as others : pgloader version "3.6.2" compiled with SBCL 2.0.11 on MacOS 11.4 installed with HomeBrew

mjmohammadi1 avatar Apr 19 '22 21:04 mjmohammadi1