CATALOG_ID = 'catalogo_id'
DATASET_ID = 'dataset_id'
DISTRIBUTION_ID = 'distribucion_id'
SERIE_ID = 'serie_id'
TIME_INDEX_FREQUENCY = 'indice_tiempo_frecuencia'
SERIES_TITLE = 'serie_titulo'
SERIES_UNITS = 'serie_unidades'
SERIES_DESCRIPTION = 'serie_descripcion'
DISTRIBUTION_TITLE = 'distribucion_titulo'
DISTRIBUTION_DESCRIPTION = 'distribucion_descripcion'
DISTRIBUTION_DOWNLOAD_URL = 'distribucion_url_descarga'
DATASET_PUBLISHER = 'dataset_responsable'
DATASET_SOURCE = 'dataset_fuente'
DATASET_TITLE = 'dataset_titulo'
DATASET_DESCRIPTION = 'dataset_descripcion'
DATASET_THEME = 'dataset_tema'
SERIES_INDEX_START = 'serie_indice_inicio'
SERIES_INDEX_END = 'serie_indice_final'
SERIES_VALUES_AMT = 'serie_valores_cant'
SERIES_DAYS_SINCE_LAST_UPDATE = 'serie_dias_no_cubiertos'
SERIES_IS_UPDATED = 'serie_actualizada'
SERIES_LAST_VALUE = 'serie_valor_ultimo'
SERIES_SECOND_LAST_VALUE = 'serie_valor_anterior'
SERIES_PCT_CHANGE = 'serie_var_pct_anterior'
SERIES_DISCONTINUED = 'serie_discontinuada'
HITS_TOTAL = 'consultas_total'
HITS_30_DAYS = 'consultas_30_dias'
HITS_90_DAYS = 'consultas_90_dias'
HITS_180_DAYS = 'consultas_180_dias'

METADATA_ROWS = [
    CATALOG_ID,
    DATASET_ID,
    DISTRIBUTION_ID,
    SERIE_ID,
    TIME_INDEX_FREQUENCY,
    SERIES_TITLE,
    SERIES_UNITS,
    SERIES_DESCRIPTION,
    DISTRIBUTION_TITLE,
    DISTRIBUTION_DESCRIPTION,
    DISTRIBUTION_DOWNLOAD_URL,
    DATASET_PUBLISHER,
    DATASET_SOURCE,
    DATASET_TITLE,
    DATASET_DESCRIPTION,
    DATASET_THEME,
    SERIES_INDEX_START,
    SERIES_INDEX_END,
    SERIES_VALUES_AMT,
    SERIES_DAYS_SINCE_LAST_UPDATE,
    SERIES_IS_UPDATED,
    SERIES_LAST_VALUE,
    SERIES_SECOND_LAST_VALUE,
    SERIES_PCT_CHANGE,
    SERIES_DISCONTINUED,
    HITS_TOTAL,
    HITS_30_DAYS,
    HITS_90_DAYS,
    HITS_180_DAYS,
]

SOURCES_DATASET_SOURCE = 'dataset_fuente'
SOURCE_SERIES_AMT = 'series_cant'
SOURCE_VALUES_AMT = 'valores_cant'
SOURCE_FIRST_INDEX = 'fecha_primer_valor'
SOURCE_LAST_INDEX = 'fecha_ultimo_valor'
SOURCES_ROWS = [
    SOURCES_DATASET_SOURCE,
    SOURCE_SERIES_AMT,
    SOURCE_VALUES_AMT,
    SOURCE_FIRST_INDEX,
    SOURCE_LAST_INDEX
]


STATA_VALUES_COLS = [SERIE_ID, 'indice_tiempo', 'valor']
