Приложение 1. Запрос на выгрузку контактов SELECT contact_id, level_id, bd_correct, y_bd, md_bd, birth_date, gender_rus, number_of_child, email1, could_check_email, mobile_phone, could_check_mobile_phone, could_check_mobile_phone_not_mask, contact_crm_guid, sum_disc, max_sale_date, cheque_count, avg_cheque, avg_cheque_without_disc, bonus_value, status_value, active_bonus_value, active_status_value, registration_d, registration_dt, registration_date, first_name, last_name, middle_name, full_name, region_id, first_shop_d, last_shop_d, first_shop_id, last_shop_id, freq_shop_id, years_old, days_to_bd, days_to_future_bd, contact_source_id, contact_source, ea, push_notification, orgunit_id, pref_orgunit_id, freq_orgunit_id, is_email_verified, state_contact, status_code, is_wallet, wallet_bind_date, wallet_unbind_date, contact_crmguid, email_hash, active_contact, allownotification, defaultcard, agreetoterms_id, agreetoterms, has_anket_scan_id, has_anket_scan, mobileapp, allowereciept, is_del, validity_id, validity, unsubhash, last_card, dt_load, contact_type, city_name, mobileverified, timezone, editable_level, phone_hash, cards_count, donotphone, participant_status, check_valid_email, created_on, preferred_hour, modified_on, owner_id, subject_id FROM dwh.contacts_info; Приложение 2. Запрос на выгрузку карт SELECT card_id, card_name, contact_id, card_type_id, card_type, card_status_id, card_status, card_state_id, card_state, master_account_id, is_has_masteraccount, ea, last_transaction_date, activation_date, status_date, card_level, bonus_type_id, bonus_type, card_start_date, dt_load, is_del, card_end_date, first_shop_d, last_shop_d, first_shop_id, last_shop_id, secondary_id, emission_task_id, card_registration_date FROM dwh.cards_info; Приложение 3. Запрос на выгрузку магазинов SELECT orgunit_id, name, ea, date_open, city, region, region_name, characteristics, external_id, address, opening_time, closing_time FROM dwh.shop Приложение 4. Запрос на выгрузку кампаний SELECT campaign_id, campaign_name, actual_start, actual_end, external_id, is_active FROM dwh.campaign; Приложение 5. Запрос на выгрузку правил списания и начисления бонусов SELECT rule_id, rule_name, campaign_id, campaign_name, date_from, date_to, owner_id, is_active, bonus_type, use_commodity_campaign, use_personal_campaign, use_certificate, use_articleset, external_id FROM dwh.rule; Приложение 6. Запрос на выгрузку товаров SELECT id, article_name, extgroup_pid, extgroup_name, subgroup_pid, subgroup_name, subcategory_pid, subcategory_name, category_pid, category_name, brand_name, external_id, extgroup_external_id, subgroup_external_id, subcategory_external_id, category_external_id, ch1, ch2, ch3, ch4, string1, source_id, min_calc_price, manufacturer_id, manufacturer_name, icon_url, guid, source_table FROM dwh.article_fat; Приложение 7. Запрос на выгрузку позиций чеков SELECT ch_number, dt, d, ym, oper_type, article_id, price, quantity, summdisc, summ, discount, cheque_id, chequeitem_id, card_id, coupon_num, ea_ch, ea_ci, campaign_id, bo_ch, bo_ci, shop_id, pos_id, summ_ch, summdisc_ch, is_del, contact_id, partition_id, dt_load, d_load, start_of_week_from_thursday, start_of_month, oper_type_name, position_number, paid_by_bonus, mcp, payment_type, card_type_id, state_contact, is_del_contact, freq_shop, agreetoterms, sms, email, sms_send, bonus_balance, max_sale_date, region_name, brand_name, article_external_id FROM dwh.chequeitems_retro WHERE d > '1970-01-01' AND dt_insert >= (today()-toIntervalDay(1)+toIntervalHour(5)) Приложение 8. Запрос на выгрузку бонусов начисления или списания SELECT bonus_id, source_table, is_delete, value, dt_created, d_created, parent_type_id, parent_id, rule_id, campaign_id, is_status, oper_type, chequeitem_id, article_id, ea_ci, cheque_id, shop_id, card_id, is_order, credit_bonus_id, dt_start_date, d_start_date, dt_finish_date, d_finish_date, remainder, dt_load, cheque_summ, cheque_summdiscounted, ci_quantity, ci_summ, ci_summdiscounted FROM dwh.bonus_slim_retro WHERE dt_insert >= (today()-toIntervalDay(1)+toIntervalHour(5)) Приложение 9. Запрос на выгрузку номерных купонов SELECT coupon_id, cu_pb, cu_pe, cu_created_d, is_active, is_on_bonus, offer_rule_id, charge_rule_id, charge_rule_name, emission_task_id, emission_task_name, scheduled_task_id, scheduled_task_name, emission_id, emission_name, mask, template_name, bonus_paid, cu_type_name, cu_number, cu_state, cu_state_name, cheque_id, createdon_ch_id, ch_d, ch_number, ch_campaign_id, ch_summ, ch_summd, ch_orgunit_id, ch_pos_id, ch_card_id, cu_contact_id, campaign_name, cu_is_del, ch_is_del, cu_cancellation_dt, cu_orgunit_id, dt_load, bonus_status_type, benefit_type, benefit_value FROM dwh.coupon_retro WHERE dt_insert >= (today()-toIntervalDay(1)+toIntervalHour(5));