Copyright | (c) Soostone Inc 2020 |
---|---|
License | AllRightsReserved |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- data BigQueryRunError
- mkBigQueryEnv :: (MonadCatch m, Katip m) => Maybe FilePath -> DbBackendOptions BigQuery -> BQProjectId -> Maybe BQDatasetId -> m (BackendConn BigQuery)
- mkBigQueryEnv' :: (MonadCatch m, MonadIO m) => Natural -> IO GoogleEnv -> BQProjectId -> Maybe BQDatasetId -> HashMap Text Text -> m (BackendConn BigQuery)
- mkBigQueryEnvWithCredentials :: (MonadCatch m, Katip m) => Maybe ByteString -> Credentials BigQueryScopes -> DbBackendOptions BigQuery -> BQProjectId -> Maybe BQDatasetId -> m (BackendConn BigQuery)
- mkBigQueryEnvWithJsonCredentials :: (MonadCatch m, Katip m) => Maybe ByteString -> CredentialsJson -> DbBackendOptions BigQuery -> BQProjectId -> Maybe BQDatasetId -> m (BackendConn BigQuery)
- mkBigQueryEnvWithCredentialsFile :: (MonadCatch m, Katip m) => FilePath -> DbBackendOptions BigQuery -> BQProjectId -> Maybe BQDatasetId -> m (BackendConn BigQuery)
- data family BackendConn b
- data family DbBackendOptions b
- decomposeRef :: Ref Table -> (Maybe BQProjectId, Maybe BQDatasetId, BQTableId)
- data AuthInput = AuthInput {}
- asOAuth2Context :: forall m. (MonadIO m, MonadCatch m) => AuthInput -> m OAuth2Context
Documentation
data BigQueryRunError #
Instances
Eq BigQueryRunError # | |
Defined in Napkin.Run.BigQuery (==) :: BigQueryRunError -> BigQueryRunError -> Bool # (/=) :: BigQueryRunError -> BigQueryRunError -> Bool # | |
Show BigQueryRunError # | |
Defined in Napkin.Run.BigQuery showsPrec :: Int -> BigQueryRunError -> ShowS # show :: BigQueryRunError -> String # showList :: [BigQueryRunError] -> ShowS # | |
Exception BigQueryRunError # | |
Defined in Napkin.Run.BigQuery |
:: (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
:: (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 #
:: (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.
mkBigQueryEnvWithJsonCredentials #
:: (MonadCatch m, Katip m) | |
=> Maybe ByteString | |
-> CredentialsJson | |
-> DbBackendOptions BigQuery | |
-> BQProjectId | Default project |
-> Maybe BQDatasetId | Default dataset |
-> m (BackendConn BigQuery) |
mkBigQueryEnvWithCredentialsFile #
:: (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 BackendConn b #
Instances
data BackendConn Sqlite # | |
Defined in Napkin.Run.Sqlite | |
data BackendConn Redshift # | |
Defined in Napkin.Run.Redshift | |
data BackendConn Postgres # | |
Defined in Napkin.Run.Postgres | |
data BackendConn BigQuery # | |
Defined in Napkin.Run.BigQuery data BackendConn BigQuery = BigQueryEnv {
|
data family DbBackendOptions b #
Instances
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.
AuthInput | |
|
asOAuth2Context :: forall m. (MonadIO m, MonadCatch m) => AuthInput -> m OAuth2Context #