Skip to main content
Version: Beta 🚧

Functions

featurize_async​

Featurize a DataFrame using asynchronous featurizer

Parameters

  • df (DataFrame) - The DataFrame to featurize

  • input_column (str) - The input column

  • output_column (str) - The output column

  • featurizer (Any) - The async featurizer function

  • concurrency (int) - The number of concurrent jobs to run

  • dedup () - Whether to deduplicate the results, defaults to True Default: true

  • mini_batch_size () - The mini batch size, defaults to 0 Default: 0

Returns

The DataFrame with the output column

get_cache_base_path​

Get the base path for the cache

Returns

Tuple[pyarrow._fs.FileSystem, str]: The filesystem and the path

get_df_schema​

Get the Tecton schema of the DataFrame

Parameters

  • df (DataFrame) - The DataFrame

  • as_attributes (bool) - Whether to return the schema as attributes, defaults to False Default: false

Returns

List[Any]: The schema of the DataFrame

make_request_source​

Make a request source

Parameters

  • fields () -

Returns

RequestSource: The request source

run_async​

Run the coroutine asynchronously in both Tecton and Jupyter notebooks

Parameters

  • coro (Any) - The coroutine to run

Returns

Any: The result of the coroutine

run_async_jobs​

Run the list of coroutines asynchronously in both Tecton and Jupyter notebooks

Parameters

  • jobs (List[Any]) - The list of coroutines to run

  • concurrency (int) - The number of concurrent jobs to run

Returns

List[Any]: The results of the coroutines

set_conf​

Parameters

  • conf (dict) -

set_secrets_env​

Set the secrets in the environment variables

Parameters

  • secrets_dict (Dict[str,Any]) - A dictionary of secrets

Returns

None

Example

from tecton import Secret
secrets = set_secrets_env({"env_var_name": Secret(scope="", key="")})
@batch_feature_view(
sources=[your_source, secrets],
...
)
def your_feature_view(your_source, secrets):
# no need to do anything with secrets, they are already set in the environment
...

Was this page helpful?