tabsdata.AzureSource#

class AzureSource(uri: str | list[str], credentials: AzureCredentials, format: str | FileFormat = None, initial_last_modified: str | datetime = None)[source]#

Bases: SourcePlugin

Class for managing the configuration of Azure-file-based data inputs.

format#

The format of the file. If not provided, it will be inferred from the file extension of the data.

Type:

FileFormat

uri#

The URI of the files with format: ‘az://path/to/files’. It can be a single URI or a list of URIs.

Type:

str | list[str]

credentials#

The credentials required to access Azure.

Type:

AzureCredentials

initial_last_modified#

If provided, only the files modified after this date and time will be considered.

Type:

str | datetime

__init__(uri: str | list[str], credentials: AzureCredentials, format: str | FileFormat = None, initial_last_modified: str | datetime = None)[source]#
Initializes the AzureSource with the given URI and the credentials required to

access Azure, and optionally a format and date and time after which the files were modified.

Parameters:
  • uri (str | list[str]) – The URI of the files with format: ‘az://path/to/files’. It can be a single URI or a list of URIs.

  • credentials (AzureCredentials) – The credentials required to access Azure. Must be an AzureCredentials object.

  • format (str | FileFormat, optional) – The format of the file. If not provided, it will be inferred from the file extension of the data. Can be either a string with the format or a FileFormat object . Currently supported formats are ‘csv’, ‘parquet’, ‘avro’, ‘ndjson’, ‘jsonl’ and ‘log’.

  • initial_last_modified (str | datetime, optional) – If provided, only the files modified after this date and time will be considered. The date and time can be provided as a string in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601) or as a datetime object. If no timezone is provided, UTC will be assumed.

Raises:
  • InputConfigurationError

  • FormatConfigurationError

Methods

__init__(uri, credentials[, format, ...])

Initializes the AzureSource with the given URI and the credentials required to

chunk(working_dir)

Trigger the import of the data. This must be implemented in any class that

stream(working_dir)

Attributes

credentials

The credentials required to access Azure.

format

The format of the file.

initial_last_modified

The date and time after which the files were modified.

initial_values

Return a dictionary with the initial values to be stored after execution of the plugin.

uri

'az://path/to/files'.