On 2/13/2014 5:53 PM, Jay Potharaju wrote:
> I was wondering if its possible to call a storedProcedure in the
> deltaImportQuery. This is what I 'm trying to do.
> 
>   <entity name="entity1" transformer="RegexTransformer" pk="id"
>             query="SELECT * FROM table1
>              INNER JOIN tabl2 ON table2.tbl1Id = table1.id"
> 
>         deltaImportQuery="exec populatetable2 ${dih.delta.id}"
> 
>         deltaQuery="select id from table1 where dtmodified >
> '${dih.last_index_time}'"
>  </entity>

I would expect that any SQL that can be sent as a query via your JDBC
driver should be supported.  Your best bet is to try it.  If you know
Java, you could write a simple Java program using your JDBC driver that
attempts the query.

One detail -- in order to work with newer versions of Solr/DIH, all of
your queries must return a result that includes a column with your
entity's pk value as the column name.  For that reason, I have this as
my deltaQuery:

  deltaQuery="SELECT 1 AS did"

Thanks,
Shawn

Reply via email to