You could try making a view for this query and then loading that view. This will give you simpler syntax in the data-config.xml file. You may find that the query you are trying is itself wrong.
Using a view also lets you examine the data your are importing. Lance On 2/23/09, Noble Paul നോബിള് नोब्ळ् <noble.p...@gmail.com> wrote: > > On Mon, Feb 23, 2009 at 2:09 PM, con <convo...@gmail.com> wrote: > > > > HI > > > > I made that change of quotes and case sensitivity. But now i am getting > the > > below exception while running delta-import: > > > > Document # 1 > > at > > > org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(JdbcDataSource.java:186) > > at > > > org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:143) > > at > > > org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:43) > > at > > > org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:59) > > at > > > org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEntityProcessor.java:74) > > at > > > org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:285) > > at > > > org.apache.solr.handler.dataimport.DocBuilder.doDelta(DocBuilder.java:211) > > at > > > org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:133) > > at > > > org.apache.solr.handler.dataimport.DataImporter.doDeltaImport(DataImporter.java:359) > > at > > > org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:388) > > at > > > org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:377) > > Caused by: java.sql.SQLSyntaxErrorException: ORA-00918: column > ambiguously > > defined > > > > at > > > oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91) > > at > oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112) > > at > > > oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173) > > at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455) > > at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413) > > at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030) > > at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183) > > at > > oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:774) > > at > > > oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:849) > > at > > > oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186) > > at > > > oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1770) > > at > oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1739) > > at > > > oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:298) > > at > > > org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(JdbcDataSource.java:179) > > ... 10 more > > 13:48:22,538 ERROR [STDERR] 23 Feb, 2009 1:48:22 PM > > org.apache.solr.handler.dataimport.DataImporter doDeltaImport > > SEVERE: Delta Import Failed > > > > > > Also i tried replacing deltaQuery with deltaImportQuery. This is not > > throwing any exception but not updating the index also. I have put the > same > > query that is used in full import to do the delta import. > > > deltaImportQuery is not a replacement for deltaQuery > both hast to be present. 'deltaQuery' identifies the changed rows and > deltaImportQuery uses the values to import data > > > > > > Thanks > > con > > > > > > > > > > Shalin Shekhar Mangar wrote: > >> > >> 1. There is no closing quote in transformer="TemplateTransformer > >> 2. Attribute names are case-sensitive so it should be deltaQuery instead > >> of > >> deltaquery > >> > >> On Fri, Feb 20, 2009 at 6:48 PM, con <convo...@gmail.com> wrote: > >> > >>> > >>> Hi alll > >>> > >>> I am trying to run delta-import. For this I am having the below > >>> data-config.xml > >>> > >>> <dataConfig> > >>> <dataSource type="JdbcDataSource" > >>> driver="oracle.jdbc.driver.OracleDriver" > >>> url="*******" user="****" password="*********"/> > >>> <document> > >>> <entity name="users" > >>> transformer="TemplateTransformer pk="USER_ID" > >>> query="select USERS.USER_ID, USERS.USER_NAME, > >>> USERS.CREATED_TIMESTAMP > >>> FROM USERS, CUSTOMERS where USERS.USER_ID = CUSTOMERS.USER_ID" > >>> > >>> deltaquery="select USERS.USER_ID, USERS.USER_NAME, > >>> USERS.CREATED_TIMESTAMP FROM USERS, CUSTOMERS where USERS.USER_ID = > >>> CUSTOMERS.USER_ID" > > >>> <field column="rowtype" template="users" > >>> /> > >>> </entity> > >>> </document> > >>> </dataConfig> > >>> > >>> But nothing is happening when i call > >>> http://localhost:8080/solr/users/dataimport?command=delta-import. > Whereas > >>> the dataimport.properties is getting updated with the time at which > >>> delta-import is run. > >>> > >>> Where as > >>> http://localhost:8080/solr/users/dataimport?command=full-importis > >>> properly inserting data. > >>> > >>> Can anybody suggest what is wrong with this configuration. > >>> > >>> Thanks > >>> con > >>> > >>> > >>> -- > >>> View this message in context: > >>> > http://www.nabble.com/delta-import-not-giving-updated-records-tp22120184p22120184.html > >>> Sent from the Solr - User mailing list archive at Nabble.com. > >>> > >>> > >> > >> > >> -- > >> Regards, > >> Shalin Shekhar Mangar. > >> > >> > > > > -- > > View this message in context: > http://www.nabble.com/delta-import-not-giving-updated-records-tp22120184p22157367.html > > Sent from the Solr - User mailing list archive at Nabble.com. > > > > > > > > > -- > > --Noble Paul > -- Lance Norskog goks...@gmail.com 650-922-8831 (US)