it should work

*spark-sql> create database somedb;*OK
Time taken: 2.694 seconds

*spark-sql> show databases;*OK
accounts
asehadoop
default
iqhadoop
mytable_db
oraclehadoop

*somedb*test
twitterdb
Time taken: 1.277 seconds, Fetched 9 row(s)


*spark-sql> use somedb;OK*Time taken: 0.059 seconds
spark-sql> create table test (col1 int, col2 string);
OK
Time taken: 0.245 seconds

HTH

Dr Mich Talebzadeh



LinkedIn * 
https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
<https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*



http://talebzadehmich.wordpress.com


*Disclaimer:* Use it at your own risk. Any and all responsibility for any
loss, damage or destruction of data or any other property which may arise
from relying on this email's technical content is explicitly disclaimed.
The author will in no case be liable for any monetary damages arising from
such loss, damage or destruction.



On 5 July 2016 at 07:57, lokeshyadav <[email protected]> wrote:

> Hi
> I am very new to SparkSQL and I have a very basic question: How do I create
> a database or multiple databases in sparkSQL. I am executing the SQL from
> spark-sql CLI. The query like in hive: /create database sample_db/ does not
> work here. I have Hadoop 2.7 and Spark 1.6 installed on my system.
>
> Regards
> Lokesh Yadav
>
>
>
>
> --
> View this message in context:
> http://apache-spark-user-list.1001560.n3.nabble.com/How-to-Create-a-Database-in-Spark-SQL-tp27281.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe e-mail: [email protected]
>
>

Reply via email to