#!/usr/bin/env python
# Copyright (c) TripleBlind Holdings, Inc. Confidential and Proprietary. All rights reserved.

import tripleblind as tb


raise SystemExit("This script is for reference only.")

tb.initialize()

#############################################################################
# Azure Blob Storage is a data warehouse provided by Microsoft's cloud computing
# platform.  A TripleBlind data asset can be connected to files stored within
# the data lake.  Beyond the file, you also need to account and credentials
# proper credentials to access the data.


# Your account name within Azure Blob Storage
ACCOUNT_NAME = "your_account"

# An access token used to read from this account
STORAGE_KEY = "Your+SecretKey4ADSL+CSVDataNdBaot72ymJa8JBL1B/q9daL+AStOCNjBA=="

# The file system name defined in the Azure control panel
FILESYSTEM = "example"

# The key associated with the file within Azure Blob Storage which will be
# referenced by this asset. The data file must be compatible with the usage
# within TripleBlind, such as a CSV file.
KEY_IN_BLOB = "iris.csv"

#############################################################################
# Option 1: Use database credentials

asset1 = tb.asset.AzureBlobStorageDataset.create(
    storage_account_name=ACCOUNT_NAME,
    storage_key=STORAGE_KEY,
    file_system=FILESYSTEM,
    key=KEY_IN_BLOB,
    name="Demo DB",
    desc="CSV held within Azure Data Lake",
    is_discoverable=True,
)
