[
https://issues.apache.org/jira/browse/OODT-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13537530#comment-13537530
]
Chris A. Mattmann edited comment on OODT-546 at 12/21/12 12:05 AM:
-------------------------------------------------------------------
Making said change, queries for e.g.,
{noformat}
http://localhost:8080/grid/prod?q=RETURN%3DSTUDY_PARTICIPANT_ID
{noformat}
Work fine, producing:
{noformat}
1501340$1502774$1504824$1505681$1506156$1506417$1506761$1506785$1507638$1510575$1800135$7000016$7000061$7000078$7000133$7000164$7000188$7000250$7000281$7000322$7000346$7000377$7000391$7000401$7000418$7000449$7000463$7000511$7000535$7000542$7000559$7000645$7000676$7000700$7000717$7000731$7000748$7000762$7000779$7000803$7000827$7000834$7000858$7000913$7000968$7001000$7001017$7001024$7001031$7001055$7001079$7001093$7001103$7001110$7001141$7001189$7001213$7001237$7001251$7001268$7001275$7001282$7001299$7001330$7001385$7001426$7001433$7001505$70015
{noformat}
Also to illustrate a query for multiple fields, try:
{noformat}
http://localhost:8080/grid/prod?q=RETURN%3DSTUDY_PARTICIPANT_ID+AND+RETURN%3DBASELINE_CANCER-CONFIRMATION_CODE{noformat}
Which correctly produces:
{noformat}
1501340 1$1502774 1$1504824 1$1505681 1$1506156
1$1506417 1$1506761 1$1506785 1$1507638 1$1510575
1$1800135 1$7000016 1$7000061 1$7000078 1$7000133
1$7000164 1$7000188 1$7000250 1$7000281 1$7000322
1$7000346 1$7000377 1$7000391 1$7000401 1$7000418
1$7000449 1$7000463 1$7000511 1$7000535 1$7000542
1$7000559 1$7000645 1$7000676 1$7000700 1$7000717
1$7000731 1$7000748 1$7000762 1$7000779 1$7000803
1$7000827 1$7000834 1$7000858 1$7000913 1$7000968
1$7001000 1$7001017 1$7001024 1$7001031 1$7001055
1$7001079 1$7001093 1$7001103 1$7001110 1$7001141
1$7001189 1$7001213 1$7001237 1$7001251 1$7001268
1$7001275 1$7001282 1$7001299 1$7001330 1$7001385
1$7001426 1$7001433 1$7001505 1$7001529 1$7001550
1$7001567 1$7001608 1$7001615 1$7001653 1$7001684
1$7001691 1$7001718 1$7001770 1$7001794 1$7001811
1$7001828 1$7001866 1$7001873 1$7001907 1$7001945
1$7001976 1$7002001 1$7002032 1$7002049 1$7002056
1$7002128 1$7002142 1$7002159
{noformat}
was (Author: chrismattmann):
Making said change, queries for e.g.,
{noformat}
http://localhost:8080/grid/prod?q=RETURN%3DSTUDY_PARTICIPANT_ID
{noformat}
Work fine, producing:
{noformat}
1501340$1502774$1504824$1505681$1506156$1506417$1506761$1506785$1507638$1510575$1800135$7000016$7000061$7000078$7000133$7000164$7000188$7000250$7000281$7000322$7000346$7000377$7000391$7000401$7000418$7000449$7000463$7000511$7000535$7000542$7000559$7000645$7000676$7000700$7000717$7000731$7000748$7000762$7000779$7000803$7000827$7000834$7000858$7000913$7000968$7001000$7001017$7001024$7001031$7001055$7001079$7001093$7001103$7001110$7001141$7001189$7001213$7001237$7001251$7001268$7001275$7001282$7001299$7001330$7001385$7001426$7001433$7001505$70015
{noformat}
Also to illustrate a query for multiple fields, try:
{noformat}
http://localhost:8080/grid/prod?q=RETURN%3DSTUDY_PARTICIPANT_ID
{noformat}
Which correctly produces:
{noformat}
1501340 1$1502774 1$1504824 1$1505681 1$1506156
1$1506417 1$1506761 1$1506785 1$1507638 1$1510575
1$1800135 1$7000016 1$7000061 1$7000078 1$7000133
1$7000164 1$7000188 1$7000250 1$7000281 1$7000322
1$7000346 1$7000377 1$7000391 1$7000401 1$7000418
1$7000449 1$7000463 1$7000511 1$7000535 1$7000542
1$7000559 1$7000645 1$7000676 1$7000700 1$7000717
1$7000731 1$7000748 1$7000762 1$7000779 1$7000803
1$7000827 1$7000834 1$7000858 1$7000913 1$7000968
1$7001000 1$7001017 1$7001024 1$7001031 1$7001055
1$7001079 1$7001093 1$7001103 1$7001110 1$7001141
1$7001189 1$7001213 1$7001237 1$7001251 1$7001268
1$7001275 1$7001282 1$7001299 1$7001330 1$7001385
1$7001426 1$7001433 1$7001505 1$7001529 1$7001550
1$7001567 1$7001608 1$7001615 1$7001653 1$7001684
1$7001691 1$7001718 1$7001770 1$7001794 1$7001811
1$7001828 1$7001866 1$7001873 1$7001907 1$7001945
1$7001976 1$7002001 1$7002032 1$7002049 1$7002056
1$7002128 1$7002142 1$7002159
{noformat}
> XMLPS inner-joins default table with itself
> -------------------------------------------
>
> Key: OODT-546
> URL: https://issues.apache.org/jira/browse/OODT-546
> Project: OODT
> Issue Type: Bug
> Components: xmlps
> Affects Versions: 0.5
> Reporter: Michael Joyce
> Fix For: 0.6
>
> Attachments: dump.sql, ps.xml
>
>
> When the default table is set to an existing table name, XMLPS tries to inner
> join the default table with itself, resulting in a failed query.
> Example
> With the following ps.xml file
> {code:xml}
> <oodt:xmlps xmlns:oodt="http://incubator.apache.org/oodt/0.1-incubating"
> name="CERC Query Handler" id="EDRN.CERC.CancerData">
> <!--<tables default="Table1">-->
> <tables default="Cancer_Data">
> <table name="Cancer_Data" join="STUDY_PARTICIPANT_ID_SITE_TEXT"
> tofld="STUDY_PARTICIPANT_ID_SITE_TEXT"/>
> </tables>
> <field type="dynamic" name="STUDY_PARTICIPANT_ID"
> dbname="STUDY_PARTICIPANT_ID_SITE_TEXT" />
>
> <field type="constant" name="BASELINE_CANCER-CONFIRMATION_CODE" value="1"/>
> </oodt:xmlps>
> {code}
> A query to
> {noformat}
> http://localhost:8080/web-grid/prod?q=RETURN%3DSTUDY_PARTICIPANT_ID
> {noformat}
> Results in the following:
> {noformat}
> WARNING: Error executing sql: [SELECT
> Cancer_Data.STUDY_PARTICIPANT_ID_SITE_TEXT as STUDY_PARTICIPANT_ID FROM
> Cancer_Data INNER JOIN Cancer_Data ON
> Cancer_Data.STUDY_PARTICIPANT_ID_SITE_TEXT =
> Cancer_Data.STUDY_PARTICIPANT_ID_SITE_TEXT ]: Message: Not unique
> table/alias: 'Cancer_Data'
> {noformat}
> If the default table is changed to "Participant_Data" then the query
> functions fine.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira