Exemple #1
0
import sys

sys.path.append('..')

from pipeliner import run_pipeline

import datetime
from tqdm import tqdm

# start = (datetime.datetime.now() - datetime.timedelta(days=111))
# end = (datetime.datetime.now() - datetime.timedelta(days=0))
# date_generated = [start + datetime.timedelta(days=x) for x in range(0, (end-start).days)]

sdate = datetime.date(2021, 1, 1)
edate = datetime.date(2021, 1, 20)
delta = edate - sdate

date_generated = []
for i in range(delta.days + 1):
    day = sdate + datetime.timedelta(days=i)
    date_generated.append(day)

date_list = []
for date in date_generated:
    date_list.append(date.strftime("%Y-%m-%d"))

for date in tqdm(date_list):
    run_pipeline(table_name='analytics_klupper_user_type_daily',
                 db_name='klup_production',
                 query_params={'DATE': date})
Exemple #2
0
def execute_analytics_klupper_user_type_daily():
    run_pipeline(db_name='klup_production', table_name='analytics_klupper_user_type_daily',
                 query_params={'DATE': today})
Exemple #3
0
def execute_agg_core_kpis_daily():
    run_pipeline(db_name='klup_production', table_name='agg_core_kpis_daily',
                 query_params={'START_DATE': today_minus_7_day, 'END_DATE': today, 'TIME_INTERVAL': 'DAY'})
Exemple #4
0
def execute_analytics_user_base_daily():
    run_pipeline(db_name='klup_production', table_name='analytics_user_base_daily')
Exemple #5
0
def execute_analytics_friendships_daily():
    run_pipeline(db_name='klup_production', table_name='analytics_friendships_daily', query_params={'DATE': today})
Exemple #6
0
def execute_agg_core_kpis_monthly():
    run_pipeline(db_name='klup_production', table_name='agg_core_kpis_monthly',
                 query_params={'START_DATE': day_first_last_month, 'END_DATE': last_day_of_previous_month, 'TIME_INTERVAL': 'MONTH'})
Exemple #7
0
def execute_analytics_active_klupper_details():
    run_pipeline(db_name='klup_production', table_name='analytics_active_klupper_details')
Exemple #8
0
def execute_agg_core_kpis_weekly():
    run_pipeline(db_name='klup_production', table_name='agg_core_kpis_weekly',
                 query_params={'START_DATE': last_2x_monday, 'END_DATE': this_monday, 'TIME_INTERVAL': 'WEEK'})
Exemple #9
0
from pipeliner import run_pipeline

import datetime
from tqdm import tqdm

# start = (datetime.datetime.now() - datetime.timedelta(days=111))
# end = (datetime.datetime.now() - datetime.timedelta(days=0))
# date_generated = [start + datetime.timedelta(days=x) for x in range(0, (end-start).days)]

sdate = datetime.date(2021, 1, 1)
edate = datetime.date(2021, 1, 20)
delta = edate - sdate

date_generated = []
for i in range(delta.days + 1):
    day = sdate + datetime.timedelta(days=i)
    date_generated.append(day)

print('Start Date: {}'.format(min(date_generated).strftime('%Y-%m-%d')))
print('End Date: {}'.format(max(date_generated).strftime('%Y-%m-%d')))

date_list = []
for date in date_generated:
    date_list.append(date.strftime("%Y-%m-%d"))

for date in tqdm(date_list):
	run_pipeline(table_name='analytics_friendships_daily', db_name='klup_production',query_params={'DATE':date})


import sys
sys.path.append('..')

from pipeliner import run_pipeline

run_pipeline(table_name='analytics_active_klupper_details', db_name='klup_production')


Exemple #11
0
import sys
sys.path.append('..')

from pipeliner import run_pipeline

import datetime

# start = (datetime.datetime.now() - datetime.timedelta(days=111))
# end = (datetime.datetime.now() - datetime.timedelta(days=0))
#
# date_generated = [start + datetime.timedelta(days=x) for x in range(0, (end-start).days)]
#
# date_list = []
# for date in date_generated:
#     date_list.append(date.strftime("%Y-%m-%d"))
#
# for date in tqdm(date_list):
# 	run_pipeline(table_name='agg_core_kpis_daily', db_name='klup_production',query_params={'START_DATE':'2020-04-01','END_DATE':'2020-04-02','TIME_INTERVAL':'DAY'})

# run_pipeline(table_name='agg_core_kpis_daily', db_name='klup_production',query_params={'START_DATE':'2017-07-01','END_DATE':'2017-12-31','TIME_INTERVAL':'DAY'})
# run_pipeline(table_name='agg_core_kpis_daily', db_name='klup_production',query_params={'START_DATE':'2018-01-01','END_DATE':'2018-12-31','TIME_INTERVAL':'DAY'})
# run_pipeline(table_name='agg_core_kpis_daily', db_name='klup_production',query_params={'START_DATE':'2019-01-01','END_DATE':'2019-12-31','TIME_INTERVAL':'DAY'})
# run_pipeline(table_name='agg_core_kpis_daily', db_name='klup_production',query_params={'START_DATE':'2020-01-01','END_DATE':'2020-05-01','TIME_INTERVAL':'DAY'})
run_pipeline(table_name='agg_core_kpis_daily', db_name='klup_production',query_params={'START_DATE':'2020-08-19','END_DATE':'2020-10-30','TIME_INTERVAL':'DAY'})
run_pipeline(table_name='agg_core_kpis_weekly', db_name='klup_production',query_params={'START_DATE':'2020-12-28','END_DATE':'2021-01-03','TIME_INTERVAL':'WEEK'})
run_pipeline(table_name='agg_core_kpis_monthly', db_name='klup_production',query_params={'START_DATE':'2020-12-01','END_DATE':'2020-12-31','TIME_INTERVAL':'MONTH'})


import sys

sys.path.append('..')

from pipeliner import run_pipeline

run_pipeline(table_name='analytics_user_base_daily', db_name='klup_production')