Thanks a lot Michael for giving a solution.
If I want to provide my own schema, can I do that?
 


     On Thursday, September 10, 2015 11:05 AM, Michael Armbrust 
<mich...@databricks.com> wrote:
   

 Easiest is to just use SQL:
hiveContext.sql("CREATE TABLE <tableName> USING parquet OPTIONS (path 
'<path>')")
When you specify the path its automatically created as an external table.  The 
schema will be discovered.
On Wed, Sep 9, 2015 at 9:33 PM, Mohammad Islam <misla...@yahoo.com.invalid> 
wrote:

Hi,I want to create  an external hive table using HiveContext. I have the 
following :1. full path/location of parquet data directory2. name of the new 
table3. I can get the schema as well.
What API will be the best (for 1,3.x or 1.4.x)? I can see 6 
createExternalTable() APIs but not sure which one will be the best.I didn't 
find any good documentation in source code or Java doc about the parameters of 
the APIs (i.e path, source, options etc); Any help will be appreciated.

Regards,Mohammad




  

Reply via email to