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:
4545 GROUP BY { dd_cols .fiscal_current_month_start .name } , { dd_cols .fiscal_current_month_end .name }
4646)
4747
48- INSERT INTO dbo.DimFiscalMonth (
48+ INSERT INTO { dfm_conf . table_schema } . { dfm_conf . table_name } (
4949 { dfm_cols .month_start_key .name } ,
5050 { dfm_cols .month_end_key .name } ,
5151 { dfm_cols .month_start_date .name } ,
Original file line number Diff line number Diff line change 33from pathlib import Path
44from typing import Iterable
55
6+ from ._internal .tsql_templates .dim_calendar_month_insert_template import (
7+ dim_calendar_month_insert_template ,
8+ )
69from ._internal .tsql_templates .dim_date_insert_template import dim_date_insert_template
710from ._internal .tsql_templates .dim_fiscal_month_insert_template import (
811 dim_fiscal_month_insert_template ,
@@ -713,8 +716,13 @@ def _generate_dim_fiscal_month_build_scripts(
713716 def _generate_dim_calendar_month_build_scripts (
714717 self , file_no : int , base_path : Path
715718 ) -> 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
718726
719727 def _generate_refresh_procs (self , folder_no : int ) -> int :
720728 file_no = 0
You can’t perform that action at this time.
0 commit comments