import sys


class OdsImport(object):

    def __init__(self, site_name='us', date_type="month", date_info='2022-01', hive_level='ods', hive_table=''):
        self.site_name = site_name
        self.date_type = date_type
        self.date_info = date_info
        self.hive_level = hive_level
        self.hive_table = hive_table
        self.hdfs_path = f"/home/big_data_selection/{self.hive_level}/{self.hive_table}/site_name={self.site_name}/date_type={self.date_type}/date_info={self.date_info}"
        self.ods_dict = {
            "ods": {
                "": ""
            }
        }

    def run(self):
        pass


if __name__ == '__main__':
    site_name = sys.argv[1]  # 参数1：站点
    date_type = sys.argv[2]  # 参数2：类型：day/week/4_week/month/quarter
    date_info = sys.argv[3]  # 参数3：年-月-日/年-周/年-月/年-季, 比如: 2022-1
    handle_obj = OdsImport(site_name=site_name, date_type=date_type, date_info=date_info)
    handle_obj.run()

