napkin-0.5.12
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.

-> DbBackendOptions BigQuery 
-> BQProjectId

Default project

-> Maybe BQDatasetId

Default dataset

-> 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) 
=> Natural

Number of concurrent requests

-> 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 
-> DbBackendOptions BigQuery 
-> BQProjectId

Default project

-> Maybe BQDatasetId

Default dataset

-> m (BackendConn BigQuery) 

create a google BigQuery environment.

mkBigQueryEnvWithCredentialsFile #

Arguments

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

location of credentials file.

-> DbBackendOptions BigQuery 
-> BQProjectId

Default project

-> Maybe BQDatasetId

Default dataset

-> m (BackendConn BigQuery) 

create a google BigQuery environment.

data family DbBackendOptions b #

Instances

Instances details
Eq (DbBackendOptions Sqlite) # 
Instance details

Defined in Napkin.Run.Sqlite

Eq (DbBackendOptions Redshift) # 
Instance details

Defined in Napkin.Run.Redshift

Eq (DbBackendOptions Postgres) # 
Instance details

Defined in Napkin.Run.Postgres

Eq (DbBackendOptions BigQuery) # 
Instance details

Defined in Napkin.Run.BigQuery

Show (DbBackendOptions Sqlite) # 
Instance details

Defined in Napkin.Run.Sqlite

Show (DbBackendOptions Redshift) # 
Instance details

Defined in Napkin.Run.Redshift

Show (DbBackendOptions Postgres) # 
Instance details

Defined in Napkin.Run.Postgres

Show (DbBackendOptions BigQuery) # 
Instance details

Defined in Napkin.Run.BigQuery

Generic (DbBackendOptions Sqlite) # 
Instance details

Defined in Napkin.Run.Sqlite

Associated Types

type Rep (DbBackendOptions Sqlite) :: Type -> Type #

Generic (DbBackendOptions Redshift) # 
Instance details

Defined in Napkin.Run.Redshift

Associated Types

type Rep (DbBackendOptions Redshift) :: Type -> Type #

Generic (DbBackendOptions Postgres) # 
Instance details

Defined in Napkin.Run.Postgres

Associated Types

type Rep (DbBackendOptions Postgres) :: Type -> Type #

Generic (DbBackendOptions BigQuery) # 
Instance details

Defined in Napkin.Run.BigQuery

Associated Types

type Rep (DbBackendOptions BigQuery) :: Type -> Type #

ToJSON (DbBackendOptions Sqlite) # 
Instance details

Defined in Napkin.Run.Sqlite

ToJSON (DbBackendOptions Redshift) # 
Instance details

Defined in Napkin.Run.Redshift

ToJSON (DbBackendOptions Postgres) # 
Instance details

Defined in Napkin.Run.Postgres

ToJSON (DbBackendOptions BigQuery) # 
Instance details

Defined in Napkin.Run.BigQuery

FromJSON (DbBackendOptions Sqlite) # 
Instance details

Defined in Napkin.Run.Sqlite

FromJSON (DbBackendOptions Redshift) # 
Instance details

Defined in Napkin.Run.Redshift

FromJSON (DbBackendOptions Postgres) # 
Instance details

Defined in Napkin.Run.Postgres

FromJSON (DbBackendOptions BigQuery) # 
Instance details

Defined in Napkin.Run.BigQuery

Default (DbBackendOptions Sqlite) # 
Instance details

Defined in Napkin.Run.Sqlite

Default (DbBackendOptions Redshift) # 
Instance details

Defined in Napkin.Run.Redshift

Default (DbBackendOptions Postgres) # 
Instance details

Defined in Napkin.Run.Postgres

Default (DbBackendOptions BigQuery) # 
Instance details

Defined in Napkin.Run.BigQuery

data DbBackendOptions Sqlite # 
Instance details

Defined in Napkin.Run.Sqlite

newtype DbBackendOptions Redshift # 
Instance details

Defined in Napkin.Run.Redshift

newtype DbBackendOptions Postgres # 
Instance details

Defined in Napkin.Run.Postgres

data DbBackendOptions BigQuery # 
Instance details

Defined in Napkin.Run.BigQuery

type Rep (DbBackendOptions Sqlite) # 
Instance details

Defined in Napkin.Run.Sqlite

type Rep (DbBackendOptions Sqlite) = D1 ('MetaData "DbBackendOptions" "Napkin.Run.Sqlite" "napkin-0.5.12-IOJ7B058YIK5gpjD82pDT5" 'False) (C1 ('MetaCons "SqliteOptions" 'PrefixI 'False) (U1 :: Type -> Type))
type Rep (DbBackendOptions Redshift) # 
Instance details

Defined in Napkin.Run.Redshift

type Rep (DbBackendOptions Redshift) = D1 ('MetaData "DbBackendOptions" "Napkin.Run.Redshift" "napkin-0.5.12-IOJ7B058YIK5gpjD82pDT5" 'True) (C1 ('MetaCons "RedshiftOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "_redShiftOptions_connectionPool") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural)))
type Rep (DbBackendOptions Postgres) # 
Instance details

Defined in Napkin.Run.Postgres

type Rep (DbBackendOptions Postgres) = D1 ('MetaData "DbBackendOptions" "Napkin.Run.Postgres" "napkin-0.5.12-IOJ7B058YIK5gpjD82pDT5" 'True) (C1 ('MetaCons "PostgresOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "_postgresOptions_connectionPool") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural)))
type Rep (DbBackendOptions BigQuery) # 
Instance details

Defined in Napkin.Run.BigQuery

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 CopyTable () BigQuery # 
Instance details

Command RenameTable () BigQuery #

BQ implements rename via copy-then-drop

Instance details

Command GetRelationSchema (Fields Field) BigQuery # 
Instance details

Eq (DbBackendOptions BigQuery) # 
Instance details

Show (DbBackendOptions BigQuery) # 
Instance details

Generic (DbBackendOptions BigQuery) # 
Instance details

Associated Types

type Rep (DbBackendOptions BigQuery) :: Type -> Type #

ToJSON (DbBackendOptions BigQuery) # 
Instance details

FromJSON (DbBackendOptions BigQuery) # 
Instance details

Default (DbBackendOptions BigQuery) # 
Instance details

Command (CreateMaterializedViewAs ()) Table BigQuery # 
Instance details

Command (CreateViewAs ()) Table BigQuery # 
Instance details

Command (CreateTableAs ()) Job BigQuery # 
Instance details

Command (CreateTableAs TableMeta) Job BigQuery # 
Instance details