On 11/25/07, Harrington, Paul <[EMAIL PROTECTED]> wrote:
> That is a reasonable requirement.  Perhaps we could add some
> functionality to  SQL::Translator::Producer::Dumper to produce dump/load
> pipelines like the following:
>
>                 (echo .mode csv; echo .import foo.csv foo)| sqlite3
> foo.sqlite
>
> Until such time as we have support for something like this you can
> probably get away with using sqlt-dumper as before but *excluding* your
> big table
>
>         sqlt-dumper --skip yourbigtable
>
> and then import the large table into sqlite manually (using .import)

I wrote little script to parse out the big sql into a file for each
table, which is making things a bit more manageable.

I tried sqlt-dumper on a single file and got:

import: sqlt-dumper -d MySQL admin_rights.sql
Can't load producer 'Dumper' : Error loading Dumper as
SQL::Translator::Producer::Dumper : Can't locate Template.pm in @INC
(@INC contains: /opt/local/lib/perl5/5.8.8/darwin-2level
/opt/local/lib/perl5/5.8.8
/opt/local/lib/perl5/site_perl/5.8.8/darwin-2level
/opt/local/lib/perl5/site_perl/5.8.8 /opt/local/lib/perl5/site_perl
/opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level
/opt/local/lib/perl5/vendor_perl/5.8.8
/opt/local/lib/perl5/vendor_perl .) at
/opt/local/lib/perl5/site_perl/5.8.8/SQL/Translator/Producer/Dumper.pm
line 59.
BEGIN failed--compilation aborted at
/opt/local/lib/perl5/site_perl/5.8.8/SQL/Translator/Producer/Dumper.pm
line 59.
Compilation failed in require at
/opt/local/lib/perl5/site_perl/5.8.8/SQL/Translator.pm line 765.

which I think means I'm missing a prereq?  I'm on OS X using perl from
macports, if that helps at all, with sql::translator installed using
the cpan command line.

But even using sqlt gives me a parsing error:

import: sqlt -f MySQL -t SQLite admin_rights.sql

       ERROR (line 1): Invalid statement: Was expecting comment, or use, or
                       set, or drop, or create, or alter, or insert, or
                       delimiter, or empty statement
Error: translate: Error with parser 'SQL::Translator::Parser::MySQL':
no results at /opt/local/bin/sqlt line 327.

(sql attached - looks to me).

> BTW, I am very motivated to help you out as I use some of your R stuff
> very regularly in my work!

Oh, neat.  What are you using?

Thanks,

Hadley


-- 
http://had.co.nz/

Attachment: admin_rights.sql
Description: Binary data

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-- 
sqlfairy-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlfairy-developers

Reply via email to