Hive - Is it possible to use external table on top of ES index for arbitrary FTS


(Igor Kravzov) #1

I know that external table can be defined like this

CREATE EXTERNAL TABLE artists (
id BIGINT,
name STRING,
links STRUCT<url:STRING, picture:STRING>)
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'
TBLPROPERTIES('es.resource' = 'radio/artists', 'es.query' = '?q=me*');

But can I just define table without es.query parameter and later run arbitrary FTS searches?

Thanks in advance.


(Costin Leau) #2

Not sure what you mean by FTS searches.
A Hive table is an alias really and the es.query is part of its definitions as Hive. If that query needs to be changed, one needs to define a different table as there's no way to update the original one.


(system) #3