-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into spark-3.3
- Loading branch information
Showing
1 changed file
with
14 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,13 +5,13 @@ | |
Adding Quenya-DSL dependency to your sbt build: | ||
|
||
``` | ||
libraryDependencies += "com.github.music-of-the-ainur" %% "quenya-dsl" % "1.2.2-3.3" | ||
libraryDependencies += "com.github.music-of-the-ainur" %% "quenya-dsl" % "1.2.2-$SPARK_VERSION" | ||
``` | ||
|
||
To run in spark-shell: | ||
|
||
``` | ||
spark-shell --packages "com.github.music-of-the-ainur:quenya-dsl_2.13:1.2.2-3.3" | ||
spark-shell --packages "com.github.music-of-the-ainur:quenya-dsl_2.12:1.2.0-$SPARK_VERSION" | ||
``` | ||
|
||
|
||
|
@@ -161,6 +161,18 @@ val quenyaDsl = QuenyaDSL | |
quenyaDsl.printDsl(df) | ||
``` | ||
|
||
### getDsl | ||
You can generate and asssign a DSL to variable based on a DataFrame: | ||
|
||
```scala | ||
import com.github.music.of.the.ainur.quenya.QuenyaDSL | ||
|
||
val df:DataFrame = ... | ||
val quenyaDsl = QuenyaDSL | ||
val dsl = quenyaDsl.getDsl(df) | ||
``` | ||
|
||
|
||
json: | ||
``` | ||
{ | ||
|
@@ -256,7 +268,6 @@ race$race:StringType | |
| DoubleType | FloatType | ByteType | IntegerType | LongType | ShortType | ||
``` | ||
|
||
|
||
## Author | ||
Daniel Mantovani [[email protected]](mailto:[email protected]) | ||
|
||
|