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 -> Natural -> BQProjectId -> Maybe BQDatasetId -> HashMap Text Text -> 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 -> Natural -> BQProjectId -> Maybe BQDatasetId -> HashMap Text Text -> m (BackendConn BigQuery)
- mkBigQueryEnvWithJsonCredentials :: (MonadCatch m, Katip m) => Maybe ByteString -> CredentialsJson -> Natural -> BQProjectId -> Maybe BQDatasetId -> HashMap Text Text -> m (BackendConn BigQuery)
- mkBigQueryEnvWithCredentialsFile :: (MonadCatch m, Katip m) => FilePath -> Natural -> BQProjectId -> Maybe BQDatasetId -> HashMap Text Text -> m (BackendConn BigQuery)
- data family BackendConn 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. |
-> Natural | Number of concurrent requests |
-> 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
:: (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 | |
-> Natural | Number of concurrent requests |
-> BQProjectId | Default project |
-> Maybe BQDatasetId | Default dataset |
-> HashMap Text Text | |
-> m (BackendConn BigQuery) |
create a google BigQuery environment.
mkBigQueryEnvWithJsonCredentials #
:: (MonadCatch m, Katip m) | |
=> Maybe ByteString | |
-> CredentialsJson | |
-> Natural | Number of concurrent requests |
-> BQProjectId | Default project |
-> Maybe BQDatasetId | Default dataset |
-> HashMap Text Text | |
-> m (BackendConn BigQuery) |
mkBigQueryEnvWithCredentialsFile #
:: (MonadCatch m, Katip m) | |
=> FilePath | location of credentials file. |
-> Natural | Number of concurrent requests |
-> BQProjectId | Default project |
-> Maybe BQDatasetId | Default dataset |
-> HashMap Text Text | |
-> 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 {
|
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 #