Hi,

Don't think so.

Pozdrawiam,
Jacek Laskowski
----
https://medium.com/@jaceklaskowski/
Mastering Apache Spark 2.0 http://bit.ly/mastering-apache-spark
Follow me at https://twitter.com/jaceklaskowski


On Tue, Aug 2, 2016 at 10:25 PM, pgb <pblac...@doximity.com> wrote:
> I'm interested in learning if it's possible to grab the results set from a
> query run on an external database as opposed to grabbing the full table and
> manipulating it later. The base code I'm working with is below (using Spark
> 2.0.0):
>
> ```
> from pyspark.sql import SparkSession
>
> df = spark.read\
>     .format("jdbc")\
>     .option("url", "jdbc:mysql://localhost:port")\
>     .option("dbtable", "schema.tablename")\
>     .option("user", "username")\
>     .option("password", "password")\
>     .load()
> ```
>
> Many thanks,
> Pat
>
>
>
> --
> View this message in context: 
> http://apache-spark-user-list.1001560.n3.nabble.com/In-2-0-0-is-it-possible-to-fetch-a-query-from-an-external-database-rather-than-grab-the-whole-table-tp27453.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe e-mail: user-unsubscr...@spark.apache.org
>

---------------------------------------------------------------------
To unsubscribe e-mail: user-unsubscr...@spark.apache.org

Reply via email to