prefect_fivetran.credentials
Module containing credentials for interacting with Fivetran
FivetranCredentials
Credentials block for credential use across Fivetran tasks and flows.
Attributes:
Name | Type | Description |
---|---|---|
api_key |
SecretStr
|
|
api_secret |
SecretStr
|
Fivetran API SECRET |
Examples:
Load stored Fivetran credentials:
from prefect_fivetran import FivetranCredentials
fivetran_credentials = FivetranCredentials.load("BLOCK_NAME")
Use FivetranCredentials instance to trigger a Fivetran sync:
from prefect_fivetran import FivetranCredentials
credentials = FivetranCredentials(api_key="my_api_key", api_secret="my_api_secret")
async with fivetran_credentials.get_fivetran() as fivetran:
fivetran.sync(connector_id="my_connector_id")
Source code in prefect_fivetran/credentials.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
get_fivetran
Returns api_key and api_secret for Fivetran object
Source code in prefect_fivetran/credentials.py
47 48 49 50 51 52 53 54 |
|