napkin-0.5.8
Copyright(c) Soostone Inc 2020
LicenseAllRightsReserved
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Napkin.Run.BigQuery

Description

 
Synopsis

Documentation

mkBigQueryEnv #

Arguments

:: (MonadCatch m, Katip m) 
=> Maybe FilePath

location of credentials file.

-> BQProjectId

Default project

-> Maybe BQDatasetId

Default dataset

-> HashMap Text Text 
-> m (BackendConn BigQuery) 

create a google BigQuery environment. we take the maybe provided credential file. If none, then try to use the gCloud SDK credentials

mkBigQueryEnv' #

Arguments

:: (MonadCatch m, MonadIO m) 
=> IO GoogleEnv

How do we set up each entry in the GoogleEnv pool?

-> BQProjectId

Default project

-> Maybe BQDatasetId

Default dataset

-> HashMap Text Text 
-> m (BackendConn BigQuery) 

Make a BigQuery env but with control over configuring how the Google environment is set up. You should usually call mkGoogleEnv and then fmap some customization over it.

mkBigQueryEnvWithCredentials #

Arguments

:: (MonadCatch m, Katip m) 
=> Maybe ByteString 
-> Credentials BigQueryScopes 
-> BQProjectId

Default project

-> Maybe BQDatasetId

Default dataset

-> HashMap Text Text 
-> m (BackendConn BigQuery) 

create a google BigQuery environment.

mkBigQueryEnvWithCredentialsFile #

Arguments

:: (MonadCatch m, Katip m) 
=> FilePath

location of credentials file.

-> BQProjectId

Default project

-> Maybe BQDatasetId

Default dataset

-> HashMap Text Text 
-> m (BackendConn BigQuery) 

create a google BigQuery environment.

Utilities

decomposeRef :: Ref Table -> (Maybe BQProjectId, Maybe BQDatasetId, BQTableId) #

segs are [project[dataset]]table. Usually combines with default dataset id and project id to fully resolve Refs.

data AuthInput #

Constructors

AuthInput 

Fields

Orphan instances

Backend BigQuery # 
Instance details

Associated Types

data BackendConn BigQuery #

RunBackendConn BigQuery # 
Instance details

Command Grant () BigQuery # 
Instance details

Command CheckTableExists Bool BigQuery # 
Instance details

Command DeleteFrom Job BigQuery # 
Instance details

Command InsertIntoQuery Job BigQuery # 
Instance details

Command DropTable () BigQuery # 
Instance details

Command DropView () BigQuery # 
Instance details

Command CreateViewAs Table BigQuery # 
Instance details

Command CopyTable () BigQuery # 
Instance details

Command RenameTable () BigQuery #

BQ implements rename via copy-then-drop

Instance details

Command GetRelationSchema (Fields Field) BigQuery # 
Instance details

Command (CreateTableAs ()) Job BigQuery # 
Instance details

Command (CreateTableAs TableMeta) Job BigQuery # 
Instance details