File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
src/awesome_date_dimension Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ def dim_fiscal_month_insert_template(config: Config) -> str:
45
45
GROUP BY { dd_cols .fiscal_current_month_start .name } , { dd_cols .fiscal_current_month_end .name }
46
46
)
47
47
48
- INSERT INTO dbo.DimFiscalMonth (
48
+ INSERT INTO { dfm_conf . table_schema } . { dfm_conf . table_name } (
49
49
{ dfm_cols .month_start_key .name } ,
50
50
{ dfm_cols .month_end_key .name } ,
51
51
{ dfm_cols .month_start_date .name } ,
Original file line number Diff line number Diff line change 3
3
from pathlib import Path
4
4
from typing import Iterable
5
5
6
+ from ._internal .tsql_templates .dim_calendar_month_insert_template import (
7
+ dim_calendar_month_insert_template ,
8
+ )
6
9
from ._internal .tsql_templates .dim_date_insert_template import dim_date_insert_template
7
10
from ._internal .tsql_templates .dim_fiscal_month_insert_template import (
8
11
dim_fiscal_month_insert_template ,
@@ -713,8 +716,13 @@ def _generate_dim_fiscal_month_build_scripts(
713
716
def _generate_dim_calendar_month_build_scripts (
714
717
self , file_no : int , base_path : Path
715
718
) -> int :
716
- # raise NotImplementedError()
717
- pass
719
+ scriptdef = dim_calendar_month_insert_template (self ._config )
720
+ file_path = base_path / TSQLGenerator ._get_sql_filename (
721
+ file_no , self ._config .dim_calendar_month .table_name
722
+ )
723
+ TSQLGenerator ._assert_filepath_available (file_path )
724
+ file_path .write_text (scriptdef )
725
+ return file_no + 1
718
726
719
727
def _generate_refresh_procs (self , folder_no : int ) -> int :
720
728
file_no = 0
You can’t perform that action at this time.
0 commit comments