Thanks Todd. great stuff :)

Regards,

Ashu

________________________________
From: Todd Nist <tsind...@gmail.com>
Sent: Thursday, February 19, 2015 7:46 PM
To: Ashutosh Trivedi (MT2013030)
Cc: user@spark.apache.org
Subject: Re: Tableau beta connector


I am able to connect by doing the following using the Tableau Initial SQL and a 
custom query:

  1.  First ingest csv file or json and save out to file system:

import org.apache.spark.sql.SQLContext
import com.databricks.spark.csv._
val sqlContext = new SQLContext(sc)
val demo = sqlContext.csvFile("/user/data/csv/demo.csv")
demo.toJSON.saveAsTextFile("/user/data/json/test")


  2.  Start $SPARK_HOME/sbin/start-thirftserver:

./sbin/start-thriftserver.sh --master 
spark://radtech.io:7077<http://radtech.io:7077> --total-executor-cores 2 
--driver-class-path --hiveconf hive.server2.thrift.port=10001 --hiveconf 
hive.server2.thrift.bind.host radtech.io<http://radtech.io>


  3.  Start tableau session. Create a connection to thrift server via SparkSQL 
(Beta) connector.

  4.  In Tableau add the following to the "Initial SQL"

create temporary table test
using org.apache.spark.sql.json
options (path '/user/data/json/test/*');

cache table test;


     *   Refresh connection.

Then select "New Custom SQL" and issue something like:

select * from test;


You will see your table appear.

HTH.

-Todd

On Thu, Feb 19, 2015 at 5:41 AM, ashu 
<ashutosh.triv...@iiitb.org<mailto:ashutosh.triv...@iiitb.org>> wrote:

Hi,

I would like you to read my stack overflow answer to this question. If you need 
more clarification feel free to drop a msg.

http://stackoverflow.com/questions/28403664/connect-to-existing-hive-in-intellij-using-sbt-as-build


Regards,

Ashutosh

________________________________
From: ganterm [via Apache Spark User List] <ml-node+[hidden 
email]<http:///user/SendEmail.jtp?type=node&node=21719&i=0>>
Sent: Thursday, February 19, 2015 12:49 AM
To: Ashutosh Trivedi (MT2013030)
Subject: Re: Tableau beta connector

Ashutosh,

Were you able to figure this out? I am having the exact some question.
I think the answer is to use Spark SQL to create/load a table in Hive (e.g. 
execute the HiveQL CREATE TABLE statement) but I am not sure. Hoping for 
something more simple than that.

Anybody?

Thanks!

________________________________
If you reply to this email, your message will be added to the discussion below:
http://apache-spark-user-list.1001560.n3.nabble.com/Tableau-beta-connector-tp21512p21709.html
To unsubscribe from Tableau beta connector, click here.
NAML<http://apache-spark-user-list.1001560.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>

________________________________
View this message in context: Re: Tableau beta 
connector<http://apache-spark-user-list.1001560.n3.nabble.com/Tableau-beta-connector-tp21512p21719.html>

Sent from the Apache Spark User List mailing list 
archive<http://apache-spark-user-list.1001560.n3.nabble.com/> at Nabble.com.

Reply via email to