Documentation ¶
Index ¶
- Constants
- Variables
- func CreateBqClient(projectID string) *bq.Client
- func CreateDataSet(datasetName string, bqClinet *bq.Client)
- func CreateTable(datasetName string, tableName string, bqClinet *bq.Client)
- func ImportParquet(projectID, datasetID, tableID string) error
- func InsertIntoBq(datasetName string, tableName string, bqClinet *bq.Client, mvs []parser.Movie) error
- func QueriesList() []map[string]string
- func ReadFromBq(sqlText string, bqClinet *bq.Client) error
- func ReadFromBqDryRun(sqlText string, bqClinet *bq.Client) error
- type Query
Constants ¶
View Source
const BigQuery string = "BigQuery"
Variables ¶
View Source
var QList = map[string]string{
"Movies count": "SELECT count(*) FROM `%s.%s`",
"Movies count per year": "SELECT count(*) FROM `%s.%s` WHERE year = \"2000\"",
"Moives count grouped by year": "SELECT year, count(movie_id) as ctn FROM `%s.%s` GROUP BY year ORDER BY count(movie_id) DESC",
"display a movie info": "SELECT name, year, rating, `desc` FROM `%s.%s` LIMIT 1",
"the highest voting count": "SELECT MAX(vote) FROM `%s.%s`",
"Movie with the highest voting count": "TBI",
}
Functions ¶
func CreateBqClient ¶
func CreateDataSet ¶
func ImportParquet ¶
func InsertIntoBq ¶
func QueriesList ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.