This file contains hidden or 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
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "reflect" | |
| ) | |
| type User struct { | |
| Username string `json:"user" db:"username"` |
This file contains hidden or 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
| // This code is designed to be pasted in spark-shell in a *nix environment | |
| // On Windows, replace sys.env("HOME") with a directory of your choice | |
| import java.io.File | |
| import java.io.PrintWriter | |
| import org.apache.spark.sql.hive.HiveContext | |
| import org.apache.spark.sql.SaveMode | |
| import org.apache.spark.sql.SaveMode | |
| val ctx = sqlContext.asInstanceOf[HiveContext] |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| ) | |
| type Foo struct { | |
| FirstName string `tag_name:"tag 1"` | |
| LastName string `tag_name:"tag 2"` |