Skip to content

persist_managers

mainsequence.tdag.time_series.persist_managers

APIPersistManager

local_metadata property

Lazily block and cache the result if needed.

PersistManager

build_update_details(source_class_name)
depends_on_connect(new_ts, is_api)

Connects a time Serie as relationship in the DB

get_persisted_ts()

full Request of the persisted data should always default to DB :return:

local_persist_exist_set_config(remote_table_hashed_name, local_configuration, remote_configuration, data_source, time_serie_source_code_git_hash, time_serie_source_code, remote_build_metadata)

This method runs on initialization of the TimeSerie class. We also use it to retrieve the table if is already persisted :param config:

:return:

patch_build_configuration(local_configuration, remote_configuration, remote_build_metadata)

This method can be threaded because it runs at the end of an init method Args: local_configuration: remote_configuration:

Returns:

persist_updated_data(temp_df, historical_update_id, update_tracker=None, overwrite=False)

Main update time series function, it is called from TimeSeries class

TimeScaleLocalPersistManager

Bases: PersistManager

Main Controler to interacti with TimeSerie ORM

get_full_source_data(remote_table_hash_id, engine='pandas')

Returns full stored data, uses multiprocessing to achieve several queries by rows and speed :return: