Example: Creating a Azure Service Principal Authorization Object and Use It with WRITE_NOS - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
  1. Create the authorization object or ask an administrator to create it:
    CREATE AUTHORIZATION Asp_Simplified_Auth
    USING
    AUTHSERVICETYPE 'AZURE_SERVICE_PRINCIPAL'
    CLIENT_ID 'client_id'
    CLIENT_SECRET 'client_secret'
    TENANT_ID 'tenant_id';

    Where:

    • client_id is the application identification for the Azure service principal.
    • client_secret is the password associated with the Azure service principal.
    • tenant_id is the identifier of Microsoft Entra ID instance.
  2. Associate the AUTHORIZATION OBJECT with a foreign table:
    CREATE FOREIGN TABLE Asp_Tab,
    EXTERNAL SECURITY Asp_Simplified_Auth
    USING( 	  
    LOCATION('/AZ/your-storage.blob.core.windows.net/test-az-sp/ut.csv'));
  3. Use the authorization object with WRITE_NOS:
    SELECT * FROM WRITE_NOS (
    ON (SELECT * FROM Asp_Tab)
    USING
    LOCATION('AZ/your-storage.blob.core.windows.net/test-az-sp/new/')
    MAXOBJECTSIZE('16MB')
    AUTHORIZATION(Asp_Simplified_Auth)
    STOREDAS('CSV')
    ) AS d;