- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Dataframe/Dataset from Query
- Labels:
-
Apache Spark
Created ‎03-29-2017 06:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
I have one query which contain many join. Now I want to create a Dataframe or Dataset from the query (not from a single table) in scala
Created ‎03-29-2017 08:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1) Python:
You can actually use panda to get a data frame from a query result. Read below blog for details on how to run a query on a database and get data frame from a result.
https://www.dataquest.io/blog/python-pandas-databases/
2) Scala:
You can also use jdbc driver to run a query and save the result of query in data frame. ( use spark.read.jdbc api).
Details can be found in below link.
Created ‎03-29-2017 08:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1) Python:
You can actually use panda to get a data frame from a query result. Read below blog for details on how to run a query on a database and get data frame from a result.
https://www.dataquest.io/blog/python-pandas-databases/
2) Scala:
You can also use jdbc driver to run a query and save the result of query in data frame. ( use spark.read.jdbc api).
Details can be found in below link.
Created ‎03-30-2017 04:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great Working Fine now
