Many Thanks Noble the issue was with case of the field names.
After fixing that I am getting the response for the full-data import cmd as
*-* <http://localhost:8983/solr/dataimport?command=abort#> <lst name="*
initArgs*">
*-* <http://localhost:8983/solr/dataimport?command=abort#> <lst name="*
defaults*">
* * <str name="*config*">*
C:\apache-solr-nightly\example\example-DIH\solr\db\conf\db-data-config.xml*
</str>
* * </lst>
* * </lst>
* * <str name="*command*">*abort*</str>
* * <str name="*status*">*busy*</str>
* * <str name="*importResponse*" />
*-* <http://localhost:8983/solr/dataimport?command=abort#> <lst name="*
statusMessages*">
* * <str name="*Time Elapsed*">*0:3:55.861*</str>
* * <str name="*Total Requests made to DataSource*">*3739*</str>
* * <str name="*Total Rows Fetched*">*4135*</str>
* * <str name="*Total Documents Processed*">*1402*</str>
* * <str name="*Total Documents Skipped*">*0*</str>
* * <str name="*Full Dump Started*">*2009-06-10 13:54:22*</str>
* * </lst>
* * <str name="*WARNING*">*This response format is experimental. It is
likely to change in the future.*</str>
* * </response>
As displayed above....
<str name="*Total Requests made to DataSource*">*3739*</str>
* * <str name="*Total Rows Fetched*">*4135*</str>
* * <str name="*Total Documents Processed*">*1402*</str>
are differing ....The request to the datasource is increasing ......and the
documents processed is less than the rows fetched....Please advise If I am
missing something here.
I have attached the db-data-config.xml after modifying.
Thanks in advance,
jayakeerthi
2009/6/9 Noble Paul നോബിള് नोब्ळ् <[email protected]>
> are you sure prod_cd and reg_id\ are emitted by respective entities in
> the same name if not you may need to alias those fields (using as)
>
> keep in mind ,the field namkes are case sensitive. Just to know what
> are the values emitted use debug mode or use logTransformer
>
> On Wed, Jun 10, 2009 at 4:55 AM, jayakeerthi s<[email protected]>
> wrote:
> > Hi All,
> >
> > I am facing an issue while fetching the records from database by
> providing
> > the value" '${prod.prod_cd}' " in this type at db-data-config.xml.
> > It is working fine If I provide the exact value of the product code ie
> > '302437-413'
> >
> > Here is the db-data-config.xm I am using
> >
> > <dataConfig>
> > <dataSource type="JdbcDataSource"
> driver="oracle.jdbc.driver.OracleDriver"
> > url="jdbc:oracle:thin:@*********:1521:****" user="lslsls"
> > password="*******"/>
> >
> > <document name="products">
> > <entity name="prod" pk="prod_id" query="SELECT p.prod_id,
> > p.prod_cd,
> > ps.styl_cd,
> > p.colr_disp_cd,
> > p.colr_comb_desc,
> > p.div_id,
> > p.po_grid_desc,
> > p.silo_id,
> > p.silh_id,
> > psa.sport_acty_desc,
> > pga.gndr_age_desc,
> > psh.silh_desc,
> > pso.silo_desc,
> > od.org_lgcy_div_cd,
> > greatest (
> > nvl(p.last_mod_dt,sysdate-9999),
> > nvl(ps.last_mod_dt,sysdate-9999),
> > nvl(od.last_mod_dt,sysdate-9999),
> > nvl(psa.last_mod_dt,sysdate-9999),
> > nvl(pga.last_mod_dt,sysdate-9999),
> > nvl(psh.last_mod_dt,sysdate-9999),
> > nvl(pso.last_mod_dt,sysdate-9999)
> > ) last_mod_dt
> > FROM prod p
> > INNER JOIN prod_styl ps ON p.prod_styl_id =
> ps.prod_styl_id
> > INNER JOIN org_div od ON p.div_id = od.div_id
> > LEFT OUTER JOIN prod_sport_acty psa ON p.sport_acty_id =
> > psa.sport_acty_id
> > LEFT OUTER JOIN prod_gndr_age pga ON p.gndr_age_id =
> pga.gndr_age_id
> > LEFT OUTER JOIN prod_silh psh ON p.silh_id = psh.silh_id
> > LEFT OUTER JOIN prod_silo pso ON p.silo_id = pso.silo_id
> > WHERE nvl(od.stat,'A') = 'A'
> > AND nvl(psa.stat,'A') = 'A'
> > AND nvl(pga.stat,'A') = 'A'
> > AND nvl(psh.stat,'A') = 'A'
> > AND nvl(pso.stat,'A') = 'A'">
> > AND p.prod_cd = '302437-413'">
> > <field column="prod_id" name="prod_id"/>
> > <field column="prod_cd" name="prod_cd"/>
> > <field column="styl_cd" name="styl_cd"/>
> > <field column="colr_disp_cd" name="colr_disp_cd"/>
> > <field column="colr_comb_desc" name="colr_comb_desc"/>
> > <field column="div_id" name="div_id"/>
> > <field column="po_grid_desc" name="po_grid_desc"/>
> > <field column="silo_id" name="silo_id"/>
> > <field column="sport_acty_desc" name="sport_acty_desc"/>
> > <field column="silh_id" name="silh_id"/>
> > <field column="gndr_age_desc" name="gndr_age_desc"/>
> > <field column="silh_desc" name="silh_desc"/>
> > <field column="silo_desc" name="silo_desc"/>
> > <field column="org_lgcy_div_cd" name="org_lgcy_div_cd"/>
> >
> >
> > <entity name="prod_reg" query="SELECT pr.prod_id,
> > pr.prod_cd,
> > pr.reg_id,
> > pr.retl_pr_amt,
> > pr.whsle_pr_amt,
> > pr.retl_crcy_id,
> > pr.whsle_crcy_id,
> > pr.frst_prod_offr_dt,
> > pr.end_ftr_offr_dt,
> > pr.last_mod_dt last_mod_dt
> > FROM prod_reg pr
> > WHERE prod_cd =* '${prod.prod_cd}' ">
> > *
> >
> > <field column="retl_pr_amt" name="retl_pr_amt"/>
> > <field column="whsle_pr_amt" name="whsle_pr_amt"/>
> > <field column="retl_crcy_id" name="retl_crcy_id"/>
> > <field column="whsle_crcy_id" name="whsle_crcy_id"/>
> > <field column="frst_prod_offr_dt"
> > name="frst_prod_offr_dt"/>
> > <field column="end_ftr_offr_dt" name="end_ftr_offr_dt"/>
> >
> > <field column="last_mod_dt" name="last_mod_dt"/>
> >
> >
> > <entity name="prod_reg_cmrc_styl" query="SELECT p.prod_id,
> > p.prod_cd,
> > pr.reg_id,
> > prcs.sap_lang_id,
> > prcs.reg_cmrc_styl_nm,
> > prcs.insm_desc,
> > prcs.otsm_desc,
> > prcs.dim_desc,
> > prcs.prfl_desc,
> > prcs.upr_desc,
> > prcs.mdsl_desc,
> > prcs.outsl_desc,
> > prcs.ctnt_desc,
> > prcs.size_run_desc,
> > greatest (
> > nvl(p.last_mod_dt,sysdate-9999),
> > nvl(ps.last_mod_dt,sysdate-9999),
> > nvl(pr.last_mod_dt,sysdate-9999),
> > nvl(prcs.last_mod_dt,sysdate-9999)
> > ) last_mod_dt
> > FROM prod p
> > INNER JOIN prod_styl ps ON p.prod_styl_id = ps.prod_styl_id
> > INNER JOIN prod_reg pr ON p.prod_id = pr.prod_id
> > INNER JOIN prod_reg_cmrc_styl prcs ON prcs.prod_styl_id = ps.prod_styl_id
> > AND prcs.reg_id = pr.reg_id
> > WHERE prcs.stat_cd = 'A'
> > *AND prod_cd ='${prod.prod_cd}'
> > AND reg_id = '${prod_reg.reg_id'">
> > *
> > <field column="sap_lang_id" name="sap_lang_id"/>
> > <field column="reg_cmrc_styl_nm"
> > name="reg_cmrc_styl_nm"/>
> > <field column="insm_desc" name="insm_desc"/>
> > <field column="otsm_desc" name="otsm_desc"/>
> >
> > <field column="dim_desc" name="dim_desc"/>
> > <field column="prfl_desc" name="prfl_desc"/>
> > <field column="upr_desc" name="upr_desc"/>
> >
> > <field column="mdsl_desc" name="mdsl_desc"/>
> > <field column="outsl_desc" name="outsl_desc"/>
> > <field column="ctnt_desc" name="ctnt_desc"/>
> > <field column="size_run_desc" name="size_run_desc"/>
> >
> >
> > </entity>
> > </entity>
> > </entity>
> > </document>
> > </dataConfig>
> >
> >
> > The issue is IF I replace the *AND prod_cd ='${prod.prod_cd}' AND
> reg_id =
> > '${prod_reg.reg_id'">* with the exact value '302437-413' I am getting the
> > result If not it is not
> > executing the prod_reg and prod_reg_cmrc_styl entity.
> >
> > Please advise anything I am missing in the above db-data-config.xml.
> >
> > Thanks in advance.
> >
> > Regards,
> > Jayakeerthi
> >
>
>
>
> --
> -----------------------------------------------------
> Noble Paul | Principal Engineer| AOL | http://aol.com
>
<dataConfig>
<dataSource type="JdbcDataSource" driver="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@camatld6.nike.com:1521:atlasint" user="atlas_service_product_lgd" password="toy9vets"/>
<document name="products">
<entity name="PROD" pk="PROD_ID" query="SELECT P.PROD_ID,
P.PROD_CD,
PS.STYL_CD,
P.COLR_DISP_CD,
P.COLR_COMB_DESC,
P.DIV_ID,
P.PO_GRID_DESC,
P.SILO_ID,
P.SILH_ID,
PSA.SPORT_ACTY_DESC,
PGA.GNDR_AGE_DESC,
PSH.SILH_DESC,
PSO.SILO_DESC,
OD.ORG_LGCY_DIV_CD,
GREATEST (
NVL(P.LAST_MOD_DT,SYSDATE-9999),
NVL(PS.LAST_MOD_DT,SYSDATE-9999),
NVL(OD.LAST_MOD_DT,SYSDATE-9999),
NVL(PSA.LAST_MOD_DT,SYSDATE-9999),
NVL(PGA.LAST_MOD_DT,SYSDATE-9999),
NVL(PSH.LAST_MOD_DT,SYSDATE-9999),
NVL(PSO.LAST_MOD_DT,SYSDATE-9999)
) LAST_MOD_DT
FROM PROD P
INNER JOIN PROD_STYL PS ON P.PROD_STYL_ID = PS.PROD_STYL_ID
INNER JOIN ORG_DIV OD ON P.DIV_ID = OD.DIV_ID
LEFT OUTER JOIN PROD_SPORT_ACTY PSA ON P.SPORT_ACTY_ID = PSA.SPORT_ACTY_ID
LEFT OUTER JOIN PROD_GNDR_AGE PGA ON P.GNDR_AGE_ID = PGA.GNDR_AGE_ID
LEFT OUTER JOIN PROD_SILH PSH ON P.SILH_ID = PSH.SILH_ID
LEFT OUTER JOIN PROD_SILO PSO ON P.SILO_ID = PSO.SILO_ID
WHERE NVL(OD.STAT,'A') = 'A'
AND NVL(PSA.STAT,'A') = 'A'
AND NVL(PGA.STAT,'A') = 'A'
AND NVL(PSH.STAT,'A') = 'A'
AND NVL(PSO.STAT,'A') = 'A'">
<field column="PROD_ID" name="PROD_ID"/>
<field column="PROD_CD" name="PROD_CD"/>
<field column="STYL_CD" name="STYL_CD"/>
<field column="COLR_DISP_CD" name="COLR_DISP_CD"/>
<field column="COLR_COMB_DESC" name="COLR_COMB_DESC"/>
<field column="DIV_ID" name="DIV_ID"/>
<field column="PO_GRID_DESC" name="PO_GRID_DESC"/>
<field column="SILO_ID" name="SILO_ID"/>
<field column="SPORT_ACTY_DESC" name="SPORT_ACTY_DESC"/>
<field column="SILH_ID" name="SILH_ID"/>
<field column="GNDR_AGE_DESC" name="GNDR_AGE_DESC"/>
<field column="SILH_DESC" name="SILH_DESC"/>
<field column="SILO_DESC" name="SILO_DESC"/>
<field column="ORG_LGCY_DIV_CD" name="ORG_LGCY_DIV_CD"/>
<entity name="PROD_REG" query="SELECT PR.PROD_ID,
PR.PROD_CD,
PR.REG_ID,
PR.RETL_PR_AMT,
PR.WHSLE_PR_AMT,
PR.RETL_CRCY_ID,
PR.WHSLE_CRCY_ID,
PR.FRST_PROD_OFFR_DT,
PR.END_FTR_OFFR_DT,
PR.LAST_MOD_DT LAST_MOD_DT
FROM PROD_REG PR
WHERE PROD_CD ='${PROD.PROD_CD}'">
<field column="RETL_PR_AMT" name="RETL_PR_AMT"/>
<field column="WHSLE_PR_AMT" name="WHSLE_PR_AMT"/>
<field column="RETL_CRCY_ID" name="RETL_CRCY_ID"/>
<field column="WHSLE_CRCY_ID" name="WHSLE_CRCY_ID"/>
<field column="FRST_PROD_OFFR_DT" name="FRST_PROD_OFFR_DT"/>
<field column="END_FTR_OFFR_DT" name="END_FTR_OFFR_DT"/>
<field column="LAST_MOD_DT" name="LAST_MOD_DT"/>
<entity name="PROD_REG_CMRC_STYL" query="SELECT P.PROD_ID,
P.PROD_CD,
PR.REG_ID,
PRCS.SAP_LANG_ID,
PRCS.REG_CMRC_STYL_NM,
PRCS.INSM_DESC,
PRCS.OTSM_DESC,
PRCS.DIM_DESC,
PRCS.PRFL_DESC,
PRCS.UPR_DESC,
PRCS.MDSL_DESC,
PRCS.OUTSL_DESC,
PRCS.CTNT_DESC,
PRCS.SIZE_RUN_DESC,
GREATEST (
NVL(P.LAST_MOD_DT,SYSDATE-9999),
NVL(PS.LAST_MOD_DT,SYSDATE-9999),
NVL(PR.LAST_MOD_DT,SYSDATE-9999),
NVL(PRCS.LAST_MOD_DT,SYSDATE-9999)
) LAST_MOD_DT
FROM PROD P
INNER JOIN PROD_STYL PS ON P.PROD_STYL_ID = PS.PROD_STYL_ID
INNER JOIN PROD_REG PR ON P.PROD_ID = PR.PROD_ID
INNER JOIN PROD_REG_CMRC_STYL PRCS ON PRCS.PROD_STYL_ID = PS.PROD_STYL_ID
AND PRCS.REG_ID = PR.REG_ID
WHERE PRCS.STAT_CD = 'A'
AND P.PROD_CD = '${PROD_REG.PROD_CD}'
AND PR.REG_ID = '${PROD_REG.REG_ID}'">
<field column="SAP_LANG_ID" name="SAP_LANG_ID"/>
<field column="REG_CMRC_STYL_NM" name="REG_CMRC_STYL_NM"/>
<field column="INSM_DESC" name="INSM_DESC"/>
<field column="OTSM_DESC" name="OTSM_DESC"/>
<field column="DIM_DESC" name="DIM_DESC"/>
<field column="PRFL_DESC" name="PRFL_DESC"/>
<field column="UPR_DESC" name="UPR_DESC"/>
<field column="MDSL_DESC" name="MDSL_DESC"/>
<field column="OUTSL_DESC" name="OUTSL_DESC"/>
<field column="CTNT_DESC" name="CTNT_DESC"/>
<field column="SIZE_RUN_DESC" name="SIZE_RUN_DESC"/>
</entity>
</entity>
</entity>
</document>
</dataConfig>