You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by James Pannozzi <ji...@gmail.com> on 2005/10/10 18:04:22 UTC

Import Using SYSCS_IMPORT_TABLE

I started using Derby, so far very very impressive,
I never used all Java database before.

Here is a question on import CSV file.

I try to import 90,000 line CSV file (see Subject,
this message) and get some exception, for example if
too many commas in a line, I naturally get Java array
bounds violation exception.  BUT-- How do I know on
which line of the CSV file the error is happening??


Is there better way of importing big CSV file into Derby, by SQL
command or PHP??


Thanks
Jim

Re: Import Using SYSCS_IMPORT_TABLE

Posted by James Pannozzi <ji...@gmail.com>.
>That would be a useful improvement to Derby, could you log a improvement
>entry in Jira? If you want to get involved in Derby this might be an

OK, I will report it on Jira.

If Derby has come this far it, might as well get
the niceities too!

Jim

On 10/13/05, Daniel John Debrunner <dj...@debrunners.com> wrote:
>
> James Pannozzi wrote:
>
> > I started using Derby, so far very very impressive,
> > I never used all Java database before.
> >
> > Here is a question on import CSV file.
> >
> > I try to import 90,000 line CSV file (see Subject,
> > this message) and get some exception, for example if
> >
> > too many commas in a line, I naturally get Java array
> > bounds violation exception.
>
> Hmmmm, that's a bad error for the situation you describe. I would expect
> a SQLException indicating badly formed input or something. Could you log
> a bug in Jira, with an example?
>
>
> > BUT-- How do I know on
> > which line of the CSV file the error is happening??
>
> That would be a useful improvement to Derby, could you log a improvement
> entry in Jira? If you want to get involved in Derby this might be an
> easy one to start with, since Java does provide streams/readers that
> produce line numbers. Therefore it could be as simple as changing the
> stream/reader used by the import code, getting the line number on an
> error and adding it to the error message.
>
> Jira details at:
>
> http://db.apache.org/derby/DerbyBugGuidelines.html
>
> Thanks,
> Dan.
>
>

Re: Import Using SYSCS_IMPORT_TABLE

Posted by Daniel John Debrunner <dj...@debrunners.com>.
James Pannozzi wrote:

> I started using Derby, so far very very impressive,
> I never used all Java database before.
> 
> Here is a question on import CSV file.
> 
> I try to import 90,000 line CSV file (see Subject,
> this message) and get some exception, for example if
> 
> too many commas in a line, I naturally get Java array
> bounds violation exception. 

Hmmmm, that's a bad error for the situation you describe. I would expect
a SQLException indicating badly formed input or something. Could you log
a bug in Jira, with an example?


> BUT-- How do I know on
> which line of the CSV file the error is happening??

That would be a useful improvement to Derby, could you log a improvement
entry in Jira? If you want to get involved in Derby this might be an
easy one to start with, since Java does provide streams/readers that
produce line numbers. Therefore it could be as simple as changing the
stream/reader used by the import code, getting the line number on an
error and adding it to the error message.

Jira details at:

http://db.apache.org/derby/DerbyBugGuidelines.html

Thanks,
Dan.