Gary,

The general format is

*select <col1>, <col2> ... from <index.type>;*

Join is not supported. Basic aggregations, group by's are supported

In your case probably,

*select col1, col2 from plant.flower;*


Thanks,
Amruth S
(09486075517)

On Wed, Jul 6, 2016 at 8:18 AM, amareshwarisr . <[email protected]>
wrote:

> Gary,
>
> I think you should be able to query es index simply with SQL, no need to
> create any dimtable or fact table in lens, unless they are part of a cube
> you are trying.
>
> Amruth, Can you help Gary on running queries on elastic search?
>
> Thanks
>
>
> On Tue, Jul 5, 2016 at 5:54 PM, Gary Wu <[email protected]> wrote:
>
>> Hi Team,
>> I am trying to use *elasticsearch *as the data source for lens. I do as
>> follow:
>> 1) I make a new directory in driver dir and add a xml.
>>
>>> ..../server/conf/drivers/
>>>
>>>
>>> *├── es│   └── es1│       └── esdriver-site.xml*
>>> ├── hive
>>> │   └── hive1
>>> │       └── hivedriver-site.xml
>>> └── jdbc
>>>     └── jdbc1
>>>         └── jdbcdriver-site.xml
>>
>>
>> <?xml version="1.0"?>
>>>>
>>> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
>>
>> <configuration>
>>>
>>>   <property>
>>>
>>>     <name>lens.driver.es.term.fetch.size</name>
>>>
>>>     <description>Fetch (buffer) size for document look up
>>>> queries</description>
>>>
>>>     <value>10000</value>
>>>
>>>   </property>
>>>
>>>   <property>
>>>
>>>     <name>lens.driver.es.query.timeout.millis</name>
>>>
>>>     <description>Query timeout</description>
>>>
>>>     <value>10000</value>
>>>
>>>   </property>
>>>
>>>   <property>
>>>
>>>     <name>lens.driver.es.max.row.size</name>
>>>
>>>     <description>max rows for es document look up queries, non existent
>>>> or -1 refers no limit</description>
>>>
>>>     <value>-1</value>
>>>
>>>   </property>
>>>
>>>   <property>
>>>
>>>     <name>lens.driver.es.aggr.bucket.size</name>
>>>
>>>     <description>Max cardinality of group by (higher value means higher
>>>> resource usage at server end)</description>
>>>
>>>     <value>6</value>
>>>
>>>   </property>
>>>
>>>   <property>
>>>
>>>     <name>lens.driver.es.jest.servers</name>
>>>
>>>     <description>List of http servers, will be used on a round robin
>>>> basis</description>
>>>
>>>     <value>*http://10.10.44.21:19200 <http://10.10.44.21:19200>*</value>
>>>
>>>   </property>
>>>
>>>   <property>
>>>
>>>     <name>lens.driver.es.jest.max.conn</name>
>>>
>>>     <description>max connections</description>
>>>
>>>     <value>20</value>
>>>
>>>   </property>
>>>
>>>   <property>
>>>
>>>     <name>lens.driver.es.client.class</name>
>>>
>>>     <description>Choice of client class, default is
>>>> JestClientImpl</description>
>>>
>>>     <value>org.apache.lens.driver.es.client.jest.JestClientImpl</value>
>>>
>>>   </property>
>>>
>>> </configuration>
>>>
>>>
>> 2) Then I edit  a driver item in lens-site.xml by
>>
>>> <property>
>>>
>>>   <name>lens.server.drivers</name>
>>>
>>>
>>>>  
>>>> <value>hive:org.apache.lens.driver.hive.HiveDriver,jdbc:org.apache.lens.driver.jdbc.JDBCDriver,
>>>> *es:org.apache.lens.driver.es.ESDriver*</value>
>>>
>>> </property>
>>>
>>>
>> In my elasticsearch (http://10.10.44.21:19200), there is *already *a
>> doc,named
>> index/type/index  ....
>> plant/flower/1 ....
>> plant/flower/2 ....
>> plant/flower/3 ....
>>
>> *What should I do next for querying the data from es *? add dim or
>> dimtable ? I did not find examples for elasticsearch in lens document.
>> Could you give me some instructions or some examples for that ?
>>
>> Thank you very much.
>> Gary
>>
>
>

Reply via email to