Jacob Blanco
08/18/2020, 9:57 AM<class 'prefect.configuration.Config'>
and I have no idea why. Did I do something wrong in the config.toml
file??Jim Crist-Harif
08/18/2020, 1:51 PMJacob Blanco
08/19/2020, 2:42 AMfrom prefect import Task
from prefect.tasks.secrets import PrefectSecret
from prefect.utilities.tasks import defaults_from_attrs
from typing import Any, List
class ConnectToGoogleSheets(Task):
def __init__(self, account_key: str = None, **kwargs: Any):
self.account_key = account_key
super().__init__(**kwargs)
def run(self, **kwargs: Any):
if not self.account_key:
raise ValueError("The account key string must be provided")
account_key_actual = PrefectSecret(self.account_key).run()
print(type(account_key_actual))
....
There's more code in the task definition but the type that gets returned is Config.