PortalLVAM / modules /tables.py
bullm's picture
Upload tables.py
8719013
raw
history blame
1.49 kB
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Aug 24 16:32:31 2021
@author: benjaminull
"""
from modules.mongo.mongo_api.mongo_api import _MongoSeries, _MongoDoc, _MongoTable
class EquityMaster(_MongoSeries):
_name = 'equity_master'
_key_ls = ['country', 'currency', 'asset', 'investable',
'ind_sector', 'ind_group', 'ind_industry',
'lv1', 'lv2', 'ind_esg', 'driver', 'field']
_drop_weekends = True
_override_boolean_key = ['investable']
class MacroMaster(_MongoSeries):
_name = 'macro_master'
_key_ls = ['country', 'currency', 'instrument', 'source', 'field']
_drop_weekends = True
class WebInfoMaster(_MongoSeries):
_name = 'web_info_master'
_key_ls = ['country', 'asset', 'investable',
'ind_sector', 'ind_group', 'ind_industry',
'ind_internal', 'ind_esg', 'source', 'field']
_drop_weekends = True
class RealEstateMaster(_MongoTable, ):
_name = 'real_estate_master'
_key_ls = ['id_pub', 'market', 'prop_type', 'bath', 'bed']
class ScoringMaster(_MongoSeries):
_name = 'scoring_master'
_key_ls = ['country', 'lv1','lv2', 'asset', 'metric']
#RealEstateMaster(id_pub=2, market=3, prop_type='depto').insert(prueba)
#RealEstateMaster().get_keys()
#RealEstateMaster().insert(dataframe, keys)
#RealEstateMaster().update_values(dataframe, keys)
# data frame nombre df.name=id_pub, mercado, tipo propiedad concatenados con un punto