Sorry Ole - I simplified my use case too much. On running it with the full set of Parallel operands I intend to use, I ran into a combination that doesn't work, or at least gives a misleading error message. Adding ‘--pipe’ to the simplified example causes this:
larryp-MBP:~ larry$ printf '%s %s\n' {a..d} | parallel -C ' ' --sqlandworker csv:///%2ftmp%2ffoo.csv/bar --pipe echo /{1}/{2}/ DBI connect('','',...) failed: No such directory '/tmp/foo.csv at /Users/larry/bin/parallel line 12252. No such directory '/tmp/foo.csv at /Users/larry/bin/parallel line 12252. larryp-MBP:~ larry$ printf '%s %s\n' {a..d} | parallel -C ' ' --sqlandworker sqlite:///%2ftmp%2ffoo.sqlite/bar --pipe echo /{1}/{2}/ DBD::SQLite::db prepare failed: no such table: bar [for Statement "SELECT * FROM bar LIMIT 1;"] at /Users/larry/bin/parallel line 12451. Thanks! — Larry On 3/21/20 12:05 AM, Larry Ploetz - lplo...@gmail.com wrote: > Thanks! Everything seems to be working as (currently) expected. > > - Larry > > On 3/20/20 7:20 PM, Ole Tange - o...@tange.dk wrote: >> On Tue, Mar 17, 2020 at 8:22 PM Larry Ploetz <lplo...@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 >> >>
pEpkey.asc
Description: application/pgp-keys