FAQ
Hello,I try to use DBInputFormat with database sql server 2000 and got error
"incorrect syntax near LIMIT".
Does hadoop support sql server 2000 ?

Thanks

Search Discussions

  • Amandeep Khurana at Jul 28, 2009 at 7:30 am

    On Mon, Jul 27, 2009 at 9:24 PM, po po wrote:

    Hello,I try to use DBInputFormat with database sql server 2000 and got
    error
    "incorrect syntax near LIMIT".
    Does hadoop support sql server 2000 ?
    DBInputFormat splits up the table to be read into chunks and each mapper
    gets to read a chunk. The splitting into chunks has different syntax in
    different databases. What you get by default supports MySQL. It didnt
    support Oracle and I tweaked it a little bit for that. I'm not sure if the
    same query will work for SQL Server but you can try it out. The patch is
    available on the HADOOP-5616 jira. Else, you can tweak the createQuery(..)
    routine in DBInputFormat to work with your DB.


    Thanks
  • Po po at Jul 28, 2009 at 7:19 am
    Ok, I will try it.Thanks
    On Tue, Jul 28, 2009 at 1:29 PM, Amandeep Khurana wrote:
    On Mon, Jul 27, 2009 at 9:24 PM, po po wrote:

    Hello,I try to use DBInputFormat with database sql server 2000 and got
    error
    "incorrect syntax near LIMIT".
    Does hadoop support sql server 2000 ?
    DBInputFormat splits up the table to be read into chunks and each mapper
    gets to read a chunk. The splitting into chunks has different syntax in
    different databases. What you get by default supports MySQL. It didnt
    support Oracle and I tweaked it a little bit for that. I'm not sure if the
    same query will work for SQL Server but you can try it out. The patch is
    available on the HADOOP-5616 jira. Else, you can tweak the createQuery(..)
    routine in DBInputFormat to work with your DB.


    Thanks
  • Enis Soztutar at Jul 28, 2009 at 8:25 am
    Probably, the MS SQL Server does not support LIMIT OFFSET constructs. In
    which case, you can plug a MsSQLDBReader similar to the ones at
    https://issues.apache.org/jira/browse/MAPREDUCE-716.

    It would be very pleasant if you could open an issue, generate a patch
    and attach it, so it is committed to trunk, thanks.

    Enis Soztutar

    po po wrote:
    Ok, I will try it.Thanks

    On Tue, Jul 28, 2009 at 1:29 PM, Amandeep Khurana wrote:

    On Mon, Jul 27, 2009 at 9:24 PM, po po wrote:

    Hello,I try to use DBInputFormat with database sql server 2000 and got
    error
    "incorrect syntax near LIMIT".
    Does hadoop support sql server 2000 ?
    DBInputFormat splits up the table to be read into chunks and each mapper
    gets to read a chunk. The splitting into chunks has different syntax in
    different databases. What you get by default supports MySQL. It didnt
    support Oracle and I tweaked it a little bit for that. I'm not sure if the
    same query will work for SQL Server but you can try it out. The patch is
    available on the HADOOP-5616 jira. Else, you can tweak the createQuery(..)
    routine in DBInputFormat to work with your DB.



    Thanks
  • Edward Capriolo at Jul 28, 2009 at 4:19 pm

    On Tue, Jul 28, 2009 at 4:26 AM, Enis Soztutarwrote:
    Probably, the MS SQL Server does not support LIMIT OFFSET constructs. In
    which case, you can plug a MsSQLDBReader similar to the ones at
    https://issues.apache.org/jira/browse/MAPREDUCE-716.

    It would be very pleasant if you could open an issue, generate a patch and
    attach it, so it is committed to trunk, thanks.

    Enis Soztutar

    po po wrote:
    Ok, I will try it.Thanks

    On Tue, Jul 28, 2009 at 1:29 PM, Amandeep Khurana <amansk@gmail.com>
    wrote:

    On Mon, Jul 27, 2009 at 9:24 PM, po po wrote:

    Hello,I try to use DBInputFormat with database sql server 2000 and got
    error
    "incorrect syntax near LIMIT".
    Does hadoop support sql server 2000 ?
    DBInputFormat splits up the table to be read into chunks and each mapper
    gets to read a chunk. The splitting into chunks has different syntax in
    different databases. What you get by default supports MySQL. It didnt
    support Oracle and I tweaked it a little bit for that. I'm not sure if
    the
    same query will work for SQL Server but you can try it out. The patch is
    available on the HADOOP-5616 jira. Else, you can tweak the
    createQuery(..)
    routine in DBInputFormat to work with your DB.



    Thanks
    I believe SQL server uses 'select top X columnlist'. 'select bottom X
    columnlist'

    Rather then using limit and top which are not available across all
    databases is it possible to create queries based on an already
    existing column that might hash out to small manageable sets per
    mapper?

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommon-user @
categorieshadoop
postedJul 28, '09 at 4:23a
activeJul 28, '09 at 4:19p
posts5
users4
websitehadoop.apache.org...
irc#hadoop

People

Translate

site design / logo © 2022 Grokbase