Hi,

If the value of tableName does not match a table already existing you need
to provide the schema. Something like this should work,

CREATE TEMPORARY TABLE debsTempPlug USING CarbonAnalytics OPTIONS
(tableName "NewTable", schema "id STRING, plug_id INT", primaryKeys "id") ;

Regards,

On Wed, Jun 24, 2015 at 4:46 PM, Rukshan Premathunga <[email protected]>
wrote:

> Hi,
>
> How can i create a table using spark SQL?
>
> I try the query
>
> CREATE TEMPORARY TABLE plugUsage
> USING CarbonAnalytics
> OPTIONS (tableName "plug_usage",
>          schema "house_id INT, household_id INT, plug_id INT, usage FLOAT
> -sp,
>          primaryKeys "household_id, plug_id"
>         );
>
> But give me following error,
>
> *ERROR: *[1.1] failure: ``insert'' expected but identifier CREATE found
> CREATE TEMPORARY TABLE X1234_plugUsage ^
>
>
> Thanks and Regards.
>
> --
> Rukshan Chathuranga.
> Software Engineer.
> WSO2, Inc.
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Dumidu Handakumbura*
Software Engineer - QA
WSO2 Inc; http://www.wso2.com/.
Mobile;
*+94777706740 *
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to