Skip to content

File System Data Fetcher

Bases: DataFetcherStrategy

Fetch data from the file system.

This fetcher is used to fetch data from a file on the file system.

Supported formats
  • CSV
  • XLSX
  • XLS
  • XML

__init__(file_path, file_format='csv', cache_strategy=None)

Initialize the FileSystemDataFetcher.

PARAMETER DESCRIPTION
file_path

The path to the file.

TYPE: str

file_format

The format of the file.

TYPE: str DEFAULT: 'csv'

cache_strategy

The cache strategy to use. If not provided, the configured cache strategy will be used.

TYPE: str DEFAULT: None

fetch_data()

Fetch data from the file system.

RETURNS DESCRIPTION
DataFrame

pd.DataFrame: Data fetched from the file system

make_cache_key()

Generate a cache key for the FileSystem data fetcher.

Uses the file path as the part of a cache key.

RETURNS DESCRIPTION
str

The cache key

TYPE: str