Skip to main content

Excel template for ods to dwd

pre-requirements

  • all table(fact & dim) must exist before running ETL jobs(ETL doesn't create table)
  • you can download this excel to your ~/Desktop for the quick start guide.

Case 1

Just copy all data from ods to dwd, not joining with other tables and no quality check.

source_db_namesource_table_namecolumn_nameincremental_typetarget_db_nametarget_table_nameTarget column_namesort_columnid_columnquality_check_rulesdim_keydim_sort_columndim_descriptionauto_create_dimauto_create_dim_iddim_db_namedim_table_namedim_column_namezip_dim_keypartition_column
usecase_odstest_custidincremental_appendusecase_dwdt_fact_test_custidTRUE
usecase_odstest_custcodeincremental_appendusecase_dwdt_fact_test_custcode
usecase_odstest_custbz_timeincremental_appendusecase_dwdt_fact_test_custbz_timeTRUE

Case 2

The Case2 is generated by the new Excel: the dim table is firstly imported, then is the fact table. The fact table joining with the dim table on the basis that the dim table is already existing and completed.

source_db_namesource_table_namecolumn_nameincremental_typetarget_db_nametarget_table_nameTarget column_namesort_columnid_columnquality_check_rulesdim_keydim_sort_columndim_descriptionauto_create_dimauto_create_dim_iddim_db_namedim_table_namedim_column_namezip_dim_keypartition_column
usecase_odstest_splitidincremental_appendusecase_dwdtest_fact_splitidTRUE
usecase_odstest_splituser_idincremental_appendusecase_dwdtest_fact_splituser_idTRUETRUEusecase_dwdt_dim_userid
usecase_odstest_splituser_nameincremental_appendusecase_dwdtest_fact_splituser_nameTRUEusecase_dwdt_dim_useruser_name
usecase_odstest_splituser_accountincremental_appendusecase_dwdtest_fact_splituser_accountusecase_dwdt_dim_useruser_account
usecase_odstest_splitbz_timeincremental_appendusecase_dwdtest_fact_splitbz_timeTRUE
usecase_odstest_useridincremental_appendusecase_dwdt_dim_useridTRUE
usecase_odstest_useruser_nameincremental_appendusecase_dwdt_dim_useruser_name
usecase_odstest_useruser_accountincremental_appendusecase_dwdt_dim_useruser_account
usecase_odstest_userbz_timeincremental_appendusecase_dwdt_dim_userbz_timeTRUE

Case 3

Case 3 is generated by joining with the dim table which has the single primary key.

source_db_namesource_table_namecolumn_nameincremental_typetarget_db_nametarget_table_nameTarget column_namesort_columnid_columnquality_check_rulesdim_keydim_sort_columndim_descriptionauto_create_dimauto_create_dim_iddim_db_namedim_table_namedim_column_namezip_dim_keypartition_column
usecase_odstest_fact_case_3idincremental_appendusecase_dwdtest_fact_target_case_3idTRUE
usecase_odstest_fact_case_3real_cust_idincremental_appendusecase_dwdtest_fact_target_case_3real_cust_idnull check, power null checkTRUETRUEusecase_dwdtest_cust_case_3id
usecase_odstest_fact_case_3real_cust_codeincremental_appendusecase_dwdtest_fact_target_case_3real_cust_codeTRUETRUEusecase_dwdtest_cust_case_3code
usecase_odstest_fact_case_3real_cust_bz_timeincremental_appendusecase_dwdtest_fact_target_case_3real_cust_bz_timeTRUETRUETRUEusecase_dwdtest_cust_case_3bz_time
usecase_odstest_fact_case_3bz_timeincremental_appendusecase_dwdtest_fact_target_case_3bz_timeTRUE

Case 4

In Case4, these 2 columns: area_code and area_name, are composite keys, to generate a new primary key (area_id) for the dim table.

source_db_namesource_table_nameSource column nameincremental_typetarget_db_nametarget_table_nameTarget column_namesort_columnid_columnquality_check_rulesdim_keydim_sort_columndim_descriptionauto_create_dimauto_create_dim_iddim_db_namedim_table_namedim_column_namezip_dim_keypartition_column
uesecase_odstest_fact_auto_dimidincremental_appendusecase_dwdtest_fact_target_auto_dimidTRUE
uesecase_odstest_fact_auto_dimincremental_appendusecase_dwdtest_fact_target_auto_dimarea_idTRUETRUEusecase_dwdtest_areaid
uesecase_odstest_fact_auto_dimarea_codeincremental_appendusecase_dwdtest_fact_target_auto_dimarea_codeTRUETRUEusecase_dwdtest_areaarea_cd
uesecase_odstest_fact_auto_dimarea_nameincremental_appendusecase_dwdtest_fact_target_auto_dimarea_nameTRUETRUEusecase_dwdtest_areaarea_nm
uesecase_odstest_fact_auto_dimarea_bz_timeincremental_appendusecase_dwdtest_fact_target_auto_dimarea_bz_timeTRUETRUETRUEusecase_dwdtest_areabz_time
uesecase_odstest_fact_auto_dimbz_timeincremental_appendusecase_dwdtest_fact_target_auto_dimbz_timeTRUE

Case 5

if origin data has no id column

not supported for now.

Case 6

In Case 6, the origin data has no business time column.

source_db_namesource_table_namecolumn_nameincremental_typetarget_db_nametarget_table_nametarget_column_nameexpressionsort_columnid_columnquality_check_rulesdim_keydim_sort_columndim_descriptionauto_create_dimauto_create_dim_iddim_db_namedim_table_namedim_column_namezip_dim_keypartition_column
usecase_odstest_fact_case_6idincremental_appendusecase_dwdtest_fact_target_case_6idTRUETRUE
usecase_odstest_fact_case_6incremental_appendusecase_dwdtest_fact_target_case_6area_idTRUETRUETRUEusecase_dwdtest_area_case_6id
usecase_odstest_fact_case_6area_codeincremental_appendusecase_dwdtest_fact_target_case_6area_codeTRUETRUEusecase_dwdtest_area_case_6area_cd
usecase_odstest_fact_case_6area_nameincremental_appendusecase_dwdtest_fact_target_case_6area_nameTRUETRUEusecase_dwdtest_area_case_6area_nm

Case 7

if origin system do HARD delete

incremental_type = incremental_diff

Case 8

In Case8, the auto-created dim table combine from multiple fact table

source_db_namesource_table_namecolumn_nameincremental_typetarget_db_nametarget_table_nametarget_column_nameexpressionsort_columnid_columnquality_check_rulesdim_keydim_sort_columndim_descriptionauto_create_dimauto_create_dim_iddim_db_namedim_table_namedim_column_namezip_dim_keypartition_column
usecase_odstest_fact_case8idincremental_appendusecase_dwdtest_fact_target_case8idTRUE
usecase_odstest_fact_case8region_idincremental_appendusecase_dwdtest_fact_target_case8region_idTRUETRUEusecase_dwdtest_regionid
usecase_odstest_fact_case8region_codeincremental_appendusecase_dwdtest_fact_target_case8region_codeTRUETRUEusecase_dwdtest_regionregion_cd
usecase_odstest_fact_case8region_nameincremental_appendusecase_dwdtest_fact_target_case8region_nameTRUETRUEusecase_dwdtest_regionregion_nm
usecase_odstest_fact_case8region_bz_timeincremental_appendusecase_dwdtest_fact_target_case8region_bz_timeTRUETRUETRUEusecase_dwdtest_regionbz_time
usecase_odstest_fact_case8bz_timeincremental_appendusecase_dwdtest_fact_target_case8bz_timeTRUE
usecase_odstest_store_factidincremental_appendusecase_dwdtest_store_fact_targetidTRUE
usecase_odstest_store_factregion_idincremental_appendusecase_dwdtest_store_fact_targetregion_idTRUETRUEusecase_dwdtest_regionid
usecase_odstest_store_factregion_countincremental_appendusecase_dwdtest_store_fact_targetregion_countTRUETRUEusecase_dwdtest_regionregion_ct
usecase_odstest_store_factregion_addressincremental_appendusecase_dwdtest_store_fact_targetregion_addressTRUETRUEusecase_dwdtest_regionregion_address
usecase_odstest_store_factregion_bz_timeincremental_appendusecase_dwdtest_store_fact_targetregion_bz_timeTRUETRUETRUEusecase_dwdtest_regionbz_time
usecase_odstest_store_factbz_timeincremental_appendusecase_dwdtest_store_fact_targetbz_timeTRUE
usecase_odstest_region_sourceidincremental_appendusecase_dwdtest_regionidTRUE
usecase_odstest_region_sourceregion_cdincremental_appendusecase_dwdtest_regionregion_cd
usecase_odstest_region_sourceregion_nmincremental_appendusecase_dwdtest_regionregion_nm
usecase_odstest_region_sourceregion_ctincremental_appendusecase_dwdtest_regionregion_ct
usecase_odstest_region_sourceregion_addressincremental_appendusecase_dwdtest_regionregion_address
usecase_odstest_region_sourcebz_timeincremental_appendusecase_dwdtest_regionbz_timeTRUE
usecase_odstest_region_sourceincremental_appendusecase_dwdtest_regionis_auto_create'0'