You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Kevin Risden (JIRA)" <ji...@apache.org> on 2016/10/07 15:24:20 UTC

[jira] [Comment Edited] (SOLR-8571) Wire the ConcatOperation into the SQLhandler

    [ https://issues.apache.org/jira/browse/SOLR-8571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15107035#comment-15107035 ] 

Kevin Risden edited comment on SOLR-8571 at 10/7/16 3:23 PM:
-------------------------------------------------------------

Once this is done we can support the following construct:
{code}
daemon(update(jdbc(connection="jdbc:solr://zkHost?collection=collection1&numWorkers=10&aggregationMode=map_reduce",
                                   sql="select year, month, concat(month, '_', year) as id, sum(price) from tablex group by year, month")))
{code}

In the code above the jdbc stream is connecting to a SolrCloud and running a SQL aggregate query which is used to update another SolrCloud collection. The daemon code will run this in the background at intervals. The concat function creates the id field on the fly so aggregates update properly.


was (Author: joel.bernstein):
Once this is done we can support the following construct:
{code}
daemon(update(jdbc(connection="jdbc:solr://zkHost?collection=collection1&numWorkers=10&aggregationMode=map_reduce",
                                   sql="select year, month, concat('month, year', '_') as id, sum(price) from tablex group by year, month")))
{code}

In the code above the jdbc stream is connecting to a SolrCloud and running a SQL aggregate query which is used to update another SolrCloud collection. The daemon code will run this in the background at intervals. The concat function creates the id field on the fly so aggregates update properly.

> Wire the ConcatOperation into the SQLhandler
> --------------------------------------------
>
>                 Key: SOLR-8571
>                 URL: https://issues.apache.org/jira/browse/SOLR-8571
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Joel Bernstein
>            Priority: Minor
>
> This will support the *concat* function. Syntax:
> {code}
> select a, b, concat('a','|','b') as c from tableX
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org