parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SQLite3 or DB Problem with Multiple Variables (gnuparallel: message


From: Ole Tange
Subject: Re: SQLite3 or DB Problem with Multiple Variables (gnuparallel: message 1 of 20) (gnuparallel: message 2 of 20)
Date: Sat, 21 Mar 2020 03:20:15 +0100

On Tue, Mar 17, 2020 at 8:22 PM Larry Ploetz <lploetz@gmail.com> wrote:

> Well, I tried some things with CSV and got different errors:
>
> larryp-MBP:parallel larry$ printf '%s %s\n' {a..d} | gtee >(cat >&2) | 
> src/parallel -C' ' --sqla csv:///%2ftmp%2ffoo.csv/bar echo /{1}/{2}/
> a b
> c d
> parallel: Error:
> Execution ERROR: Cannot open /Users/larry/git/parallel/bar: No such file or 
> directory (2) at 
> /opt/local/lib/perl5/site_perl/5.30/darwin-thread-multi-2level/DBI/DBD/SqlEngine.pm
>  line 1624.
>  called from src/parallel at 12446.

I can reproduce your error when using the unsupported `--sqla`. But it
is not a supported option. This works for me:

printf '%s %s\n' {a..d} | tee >(cat >&2) | parallel -C' '
--sqlandworker csv:///%2ftmp%2ffoo.csv/bar echo /{1}/{2}/

I am not going to spend time on figuring out why --sqla does not work.
If others find the reasons, I am cool with that.

> larryp-MBP:parallel larry$ touch /tmp/foo.csv
> larryp-MBP:parallel larry$ printf '%s %s\n' {a..d} | gtee >(cat >&2) | 
> src/parallel -C' ' --sqla csv:///%2ftmp%2ffoo.csv/bar echo /{1}/{2}/
> a b
> c d
> parallel: Error:
> Execution ERROR: Cannot open /Users/larry/git/parallel/bar: No such file or 
> directory (2) at 
> /opt/local/lib/perl5/site_perl/5.30/darwin-thread-multi-2level/DBI/DBD/SqlEngine.pm
>  line 1624.
>  called from src/parallel at 12446.

The same here: --sqla does not work, but this works for me:

printf '%s %s\n' {a..d} | gtee >(cat >&2) | parallel -C' '
--sqlandworker csv:///%2ftmp%2ffoo.csv/bar echo /{1}/{2}/

> I'm assuming it's OK to use the full DBTABLEURL (variable from the example) 
> value on the command line.
>
> However, with 1 variable this works,

No. It works because you are writing --sqlandworker instead of --sqla.

> but completely disregards the directory:
> larryp-MBP:parallel larry$ parallel --sqlandworker 
> csv:///%2FBOGUS%2FBOGUS2/mytable3 seq ::: {1..10}

That looks like a bug in DBI. Thanks.

/Ole



reply via email to

[Prev in Thread] Current Thread [Next in Thread]