from src import config from src.constants import DataType from src.constants.queries.mysql.playlists_digest import DESTINATION_TABLE_PLAYLIST_DIGEST_PLAYLISTS, \ DOWNLOAD_COLUMNS_PLAYLIST_DIGEST_PLAYLISTS, ID_COLUMN_PLAYLIST_DIGEST_PLAYLISTS from src.constants.queries.snowflake.playlists_digest import AGGREGATE_PLAYLIST_DIGEST_PLAYLISTS from src.processors.base import BaseProcessor class PlaylistDigestPlaylistsProcessor(BaseProcessor): _data_type = DataType.PLAYLIST_DIGEST_PLAYLISTS _save_temp_table = True _snowflake_query = AGGREGATE_PLAYLIST_DIGEST_PLAYLISTS _destination_table = DESTINATION_TABLE_PLAYLIST_DIGEST_PLAYLISTS _destination_columns = DOWNLOAD_COLUMNS_PLAYLIST_DIGEST_PLAYLISTS _id_column = ID_COLUMN_PLAYLIST_DIGEST_PLAYLISTS @property def snowflake_query(self) -> str: return self._snowflake_query.format( database=config.Snowflake.PUBLIC_DATA_MAIN_DATABASE, schema=config.Snowflake.PUBLIC_DATA_MAIN_PLAYLISTS_SCHEMA, )