lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Re: Timestamp compatibility while performing delta import in solr
Date Wed, 24 Jul 2013 17:04:16 GMT
On 7/24/2013 3:32 AM, archit2112 wrote:
> However,This is not working and im getting the following error - 
> Unable to execute query: SELECT * FROM PRODUCT WHERE PID= Processing
> Document # 1
> Caused by: java.sql.SQLException: ORA-00936: missing expression

Here's your first entity:

<entity name="PRODUCT" pk="PID" query="SELECT * FROM PRODUCT"
deltaImportQuery="SELECT * FROM PRODUCT WHERE PID=${}"
deltaQuery="SELECT PID FROM PRODUCT WHERE scn_to_timestamp(ora_rowscn) >
to_timestamp('${dih.last_index_time}', 'YYYY/MM/DD HH:MI:SS')">

It seems that when your deltaQuery executes, the first document has no
value for PID.  If PID is indeed the primary key for the 'PRODUCT'
table, which is what you have told DIH is the case, then the only thing
that makes sense is that it is a blank value, rather than NULL.

If you have something else in your database that is a better indicator
of what's new than a timestamp, you can use that, you just have to pass
it in as a parameter when you access the dataimport URL by HTTP.  If the
parameter on the URL is &mycolumn=myvalue then you can use
${dih.request.mycolumn} in your config file.


View raw message