How to create an external Table on ES document uisng Spark SQL(ES-Hadoop 6.7.0 and ES 6.7.0)

Hi Team,
Requesting you help. Is it possible to create a table using spark-sql like mentioned here ( [Use SQL to access Elasticsearch index])
I am able to create external table successfully on top of ES document using ES-hive using ESStorage Handler , however I am unable to create a table using spark-sql synstax ,and using below command.

create table elasticsearch_poc
using org.elasticsearch.spark.sql
  'nodes'= 'node name',

Below command is using to create table(successfully) using HIVE.

create external table elasticserach_test(col1 STRING,col2 STRING) 
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'
   'es.resource'='resourcenamet' , 
   'es.nodes.wan.only' = 'true',


I would take a look at the documentation for setting up tables in SparkSQL using ES-Hadoop:

Thank You James for looking into the issue.
Just to reiterate . Using ESHandler(elasticsearch-hive) I am able to create a table and able to create a temporary table using (ES-Spark) .However unable to create permanent table using ES-Spark (spark-sql syntax) .

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.