create_tdapi_context | teradataml Azure Extension Library | API Integration - create_tdapi_context Method - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

Use the create_tdapi_context method to create a TDAPI context to be used to run TDApiClient functions.

Required Arguments:
  • type: Specifies the cloud type of the TDAPI context.

    If the cloud type is Azure, the only accepted value is "azure".

  • datastore_path: Specifies path in Azure datastore.
Optional Argument:
  • datastore_name: Specifies the name of Azure datastore.

    If not provided, default datastore in Azure workspace is used.

Environment Variables

Create the following environment variables before using the module.
  • Required environment variables:
    • AZURE_TENANT_ID: Specifies Azure tenant ID.
    • AZURE_CLIENT_ID: Specifies Azure client ID.
    • AZURE_CLIENT_SECRET: Specifies Azure client key.
    • AZURE_SUB_ID: Specifies Azure subscription ID.
    • AZURE_RG: Specifies Azure resource group.
    • AZURE_WS: Specifies Azure workspace.
    • AZURE_REGION: Specifies Azure region.

Example

This example creates Azure Machine Learning context using "model_data" as parent folder in default datastore.

from tdapiclient import create_tdapi_context, TDApiClient
create_tdapi_context("azure", datastore_path="model_data")