【发布时间】:2015-03-28 01:37:51
【问题描述】:
我有以下数据配置:
<document name="locations">
<entity pk="id" name="location" query="select * from locations WHERE isapproved='true'"
deltaImportQuery="select * from locations WHERE updatedate < getdate() AND isapproved='true' AND id='${dataimporter.delta.id}'"
deltaQuery="select id from locations where isapproved='true' AND updatedate > '${dataimporter.last_index_time}'">
<!-- more document fields -->
</entity>
<entity pk="id" name="offerdetails" query="SELECT title AS offer_title,ISNULL(img,'') AS offer_thumb,id AS offer_id
,startdate AS offer_startdate
,enddate AS offer_enddate
,description AS offer_description
FROM offers WHERE objectid=${location.id} AND objecttype=${location.objecttype} AND approved='true' AND startdate < getdate() AND enddate > getdate()"
deltaImportQuery="SELECT title AS offer_title,ISNULL(img,'') AS offer_thumb,id AS offer_id
,startdate AS offer_startdate
,enddate AS offer_enddate
,description AS offer_description FROM offers WHERE updatedate < getdate() AND approved='true' AND id='${dataimporter.delta.id}'"
deltaQuery="SELECT id FROM offers where approved='true' AND updatedate > '${dataimporter.last_index_time}'">
<field name="id" column="offer_id" />
<field name="offer_title" column="offer_title" />
<field name="offer_thumb" column="offer_thumb" />
<field name="offer_startdate" column="offer_startdate" />
<field name="offer_enddate" column="offer_enddate" />
<field name="offer_description" column="offer_description" />
</entity>
</document>
现在,当[locations] 表中的对象更新时,我的增量导入查询/dataimport?command=delta-import 可以完美运行。
但是,当 [offers] 表中的商品更新时,deltaimport 命令不会看到这一点。
如果更新了报价,是否可以仅增量导入相应位置的更新报价?
然后没有:
一种。必须完全导入所有位置
或
湾。必须更新这个单一位置,然后执行常规 deltaimport?
【问题讨论】: