Re: [sqlite] Best solution to import big DBF file?

2011-06-27 Thread Gilles Ganault
On Mon, 27 Jun 2011 18:05:41 +0200, Dominique Pellé
 wrote:
>Spatialite (extension of SQLite) implements VirtualDbf and VirtualShp.

Thanks for the info. I'm not sure I understand what Spatialite is
("The SpatiaLite extension enables SQLite to support spatial data too
[aka GEOMETRY], in a way conformant to OpenGis specifications")  but
I'll give it a shot.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Best solution to import big DBF file?

2011-06-27 Thread Dominique Pellé
Gilles Ganault  wrote:

> Hello
>
> I have a 87MB file in DBF format that I'd like to import into SQLite.
>
> What is the best tool for this, free or affordable?
>
> Thank you.


Spatialite (extension of SQLite) implements VirtualDbf and VirtualShp.

To create a virtual table from a DBF file "foo.dbf" using UTF-8 as
encoding for TEXT columns:

spatialite> CREATE VIRTUAL TABLE virt_tbl USING VirtualDbf(foo.dbf, UTF-8);

If you want to create a real Sqlite table (not virtual), you can
copy the content of the virtual table into a real table:

spatialite> CREATE TABLE tbl AS SELECT * FROM virt_tbl;


The Spatialite shell also provides the following dot command for convenience:

spatialite> .loaddbf foo.dbf tbl UTF-8

-- Dominique
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Best solution to import big DBF file?

2011-06-27 Thread Gilles Ganault
On Mon, 27 Jun 2011 17:14:52 +0400, Alexey Pechnikov
 wrote:
>1. sqlite3-dbf - converter of XBase / FoxPro tables to SQLite
>http://sqlite.mobigroup.ru/wiki?name=sqlite3-dbf

Thanks Alexey, worked the first time:

# dpkg -i sqlite3-dbf_2010.08.16_i386.deb
# sqlite3-dbf myfile.dbf | sqlite3 myfile.sqlite

Thanks everyone.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Best solution to import big DBF file?

2011-06-27 Thread Gilles Ganault
On Mon, 27 Jun 2011 14:22:43 +0100, Carlos Rocha
 wrote:
>I think you'll find what you need here
>http://www.vlsoftware.net/

Thanks for the link.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Best solution to import big DBF file?

2011-06-27 Thread Carlos Rocha
Hi

I think you'll find what you need here
http://www.vlsoftware.net/

> Hello
>
> I have a 87MB file in DBF format that I'd like to import into SQLite.
>
> What is the best tool for this, free or affordable?
>
> Thank you.
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Best solution to import big DBF file?

2011-06-27 Thread Simon Slavin

On 27 Jun 2011, at 2:12pm, Gilles Ganault wrote:

>> As Simon said, the sqlite3 shell can import structured text files.
> 
> But I need to first convert the DBF file into CSV, right?

Your problem seems to be with opening the DBF file without the original app.  
So perhaps there's a general DBF manager application that'll export it to CSV.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Best solution to import big DBF file?

2011-06-27 Thread Alexey Pechnikov
1. sqlite3-dbf - converter of XBase / FoxPro tables to SQLite
http://sqlite.mobigroup.ru/wiki?name=sqlite3-dbf

2. Or see the VirtualText extension from Spatialite project.
This extension can be builded with SQLite
http://sqlite.mobigroup.ru/dir?name=ext/virtualtext
http://sqlite.mobigroup.ru/dir?name=ext/iconv
I did support SQLite build with this some times ago (deb packages),
but the first solution is more useful for me now.

2011/6/27 Gilles Ganault :
> Hello
>
> I have a 87MB file in DBF format that I'd like to import into SQLite.
>
> What is the best tool for this, free or affordable?
>
> Thank you.
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
Best regards, Alexey Pechnikov.
http://pechnikov.tel/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Best solution to import big DBF file?

2011-06-27 Thread Gilles Ganault
On Mon, 27 Jun 2011 14:57:31 +0200, Stephan Beal
 wrote:
>Google suggests several:

Yes, but I'd like to save time by not having to evaluate them if
someone's done this recently.

There are only two converters listed on the site, and they seem to
require FoxPro for DOS
www.sqlite.org/cvstrac/wiki?p=ConverterTools

I tried opening the 87MB file in OpenOffice, but it still wasn't done
after running for 5mn :-/

>As Simon said, the sqlite3 shell can import structured text files.

But I need to first convert the DBF file into CSV, right?

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Best solution to import big DBF file?

2011-06-27 Thread Stephan Beal
On Mon, Jun 27, 2011 at 2:51 PM, Gilles Ganault wrote:

> Is there a way to open a DBF file and get a text dump?
>

Google suggests several:

http://www.google.de/search?sourceid=chrome=UTF-8=export+dbf+file+to+text

As Simon said, the sqlite3 shell can import structured text files.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Best solution to import big DBF file?

2011-06-27 Thread Gilles Ganault
On Mon, 27 Jun 2011 13:42:33 +0100, Simon Slavin
 wrote:
>Dump the contents as text and use the SQLite command-line shell to import it.

Thanks for the tip, but I don't have the DBase application, just the
file (it's actually three files: Two small ones with the column
definitions and their possible values, and the big one with the data).

Is there a way to open a DBF file and get a text dump?

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Best solution to import big DBF file?

2011-06-27 Thread Simon Slavin

On 27 Jun 2011, at 1:38pm, Gilles Ganault wrote:

> I have a 87MB file in DBF format that I'd like to import into SQLite.
> 
> What is the best tool for this, free or affordable?

Dump the contents as text and use the SQLite command-line shell to import it.



For the text format, if the data is simple and doesn't include tricky 
characters, you can use CSV format.  If that's not the case you might try 
dumping as SQL commands and using the command-line shell to '.read' them.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users