Fin Sesc Overview
Total Page:16
File Type:pdf, Size:1020Kb
FIN_SESC OVERVIEW
The FIN_SESC process collects summary data for Cash, Encumbrances, Allotment, Program Budgets, Encumbrances (Obligations), Transfers, Expenditures and Revenues into one table that can easily be used for querying and further analysis. In effect a summary table with ALL FINANCIAL data (codes) in ready to use form. This table is used as the base to create the reporting tables for Cash, Allotment and Program reporting. Each of the reporting tables is ready to use 'as is' in reports or downloaded through a stored procedure into Excel with data available to the task(s) levels.
The primary FACT table that is built is ZFA.FACT_FIN_ALL_SESC. Except for Allotment, the data is collected from the Oracle Financial Data Warehouse.
The Table FACT_FIN_ALL_PROG is also created and contains summarized data from table ZFA.FACT_FIN_ALL_SESC as well as expanded data related to programs for reporting and further analysis.
The Tables ZFA.ORACLE_CONTRACT and ZFA.CONTRACT_STATUS are created to provide contract detail. The Status table determines if a contract is open or closed and is used in reporting.
DIM TABLES Naming conventions from the Oracle Financial Data Warehouse are changed in FIN_SESC for consistency and to be consistent with the AdvantageME suffixes: _CD; _NM; _SH_NM. Other inconsistencies are also changed (i.e. Object table). Doing so allows column names such as Dept, Bureau, Unit etc. to be used in DIM views to hold both the _CD and _NM and prevent changes to column names and concatenating tasks being necessary on export or report writing.
EXAMPLES:
APPROP: 015831 BUREAU LABOR STANDARDS ADMIN
FUND: 010 GF
UNIT: S531 BLS COMPUTERZN
CASH Cash data is obtained from the Oracle table MFASIS.DBLK_BGN_BAL_TMP_S and posted into the SQL table ZFA. ORACLE_BASE.
At the beginning of a new fiscal year, while the DBLK_BGN_BAL_TMP_S table is empty for several weeks, the beginning cash balance is estimated and used until the table is updated with actual beginning balances.
FIN_SESC OVERVIEW Page 1 of 14 Pages Updated 3/31/2014 ALLOTMENT The Allotment data is collected directly from BFMS using a stored procedure (see SESC_ALLOTMENT) and a BFMS staged table (see BFMS.TEMP_STAGED).
PROGRAM BUDGETS Program Budget data is collected from the Oracle table
MFASISFN.VW_BUD_STRU_39_LVL_2.
ENCUMBRANCES + TRANSFERS &REVENUES + EXPENDITURES ACCRUED + EXPENDITURES Encumbrance (Bucket 13) and Transfer (Bucket 90) data as well as Revenue (Bucket 24), Expenditure (Bucket 15) and Accrued Expenditures (Bucket 14) data is collected from the Oracle table MFASISFN.VW_JRNL_ACTG.
FIN_ALL PROCESSES (in order of execution)
CHECK FOR ORACLE DATABASE UPDATES SQL 2008R2 2015 - The stored procedure dbo.DW_ORA_COMPLETION is executed with the file located at: V:\DOCUMENTATION\DATA MAPS\ORACLE PROD STRUCTURE\ORA_DB_UPDATE_CHECK which is set up against the Windows Scheduler.
SQL 2012 2016 - Currently kicked off by a Package on the Batch Server-OIT- ISAEDBSQLB3.SOM.W2K.STATE.ME.US\DOS with a Job called FIN_SESC_DB_REFRESH) The stored procedure will check the Oracle data warehouse table MFASISFN.DBLK_UPLD_STATUS_S for the last warehouse update datetime stamp. If the Oracle stamp is greater than the last datetime stamp in SQL table dbo.COMPLETION_ORA then a new datetime stamp row is added to table dbo.COMPLETION_ORA which will execute a series of triggers that will execute stored procedures to create the SQL table ZFA.FACT_FIN_ALL_SESC.
Figure 1: Format for table dbo.COMPLETION_ORA TRIGGERS ON TABLE FIN_SESC.dbo.COMPLETION_ORA See VISIO flowchart of Triggers/Stored Procedures and the tables created.
Trigger TR_FIN_ALL_ORABASE . executes stored procedure ZFA.SESC_ORABASE which collects base data from Oracle table MFASISFN.VW_JRNL_ACTG and inserts it into SQL table ZFA.ORACLE_BASE.
The extract was minimized to reduce query and insert performance times.
FIN_SESC OVERVIEW Page 3 of 14 Pages Updated 3/31/2014 Only data for the current budget fiscal year (BFY) is extracted and replaced into the ZFA.ORACLE_BASE table, except in July when the current BFY and the BFY just ended is replaced to capture any year end activity.
The following columns are grouped and extracted from MFASISFN.VW_JRNL_ACTG where PSCD.BUCKET IN (15,13,90,24) and added to SQL table ZFA.ORACLE_BASE.
BFY
ACTIVITY
APPROP
DEPT
FISC_PERIOD
FISC_QTR
FISC_YR
FUND
FUNDING_LINE
FUNDING_PRIORITY
FUNDING_PROFILE
MJR_PROG
OBJECT
POSTING_CODE
PROG_PERIOD
PROGRAM
REV_SRC
'JRN' as SOURCE_FLAG
SUB_TASK
TASK
TASK_ORD_CD
UNIT
SUM (POSTING_AMOUNT) Stored procedure ZFA.SESC_ORABASE will also add beginning cash balances to SQL table ZFA.ORACLE_BASE.
The following columns related to Cash are added to SQL table ZFA.ORACLE_BASE:
APPROP
BFY
DEPT
FUND
'CSH' AS SOURCE_FLAG
UNIT
BGN_CASH as POSTING_AMOUNT
Trigger TR_OBJREV executes stored procedure dbo.TSF_OBJREV which truncates and repopulates two SQL tables: dbo.DIM_OBJREV_TSF and dbo.DIM_OBJREV_BFMS_TSF. These additional tables are used for analysis of the data until the data warehouse includes table(s) with all the Object and Revenue Source codes from both AdvantageME and BFMS.
NOTE: 02/25/11 OSC has identified the description column in the Oracle table that can be used for this purpose. This table will become unnecessary once that happens and the stored procs reviewed and updated accordingly. (1/14/2016 change has not been made. It is working as it was originally set up.)
The OBJREV tables move both Expenditure and Revenue Object Codes into one table, and also include any BFMS Codes which are not in AdvantageME and Oracle Data Warehouse R_OBJ or R_RSRC tables.
Table dbo.DIM_OBJREV_TSF includes only AdvantageME Object Codes and Revenue Source Codes.
Table dbo.DIM_OBJREV_BFMS_TSF includes BFMS Object and Revenue codes not in AdvantageME as well as the AdvantageME Object Codes and Revenue Source Codes.
FIN_SESC OVERVIEW Page 5 of 14 Pages Updated 3/31/2014 NOTE: 02/25/11 Table dbo.DIM_OBJREV_BFMS_MANUAL must be MANUALLY updated with any additional BFMS codes not used in AdvantageME, and if they are used in the future they should be removed. The best source would be the BFMS Object table to determine object codes (ending in 00) that are not in the R_OBJ table in AdvantageME. The table is currently not available to FIN_SESC therefore is manually updated. The daily augment table reconciliation email does list any discrepancies between the object codes used in the FIN_ALL tables and the AdvantageME object table. (1/14/2016 change has not been made.)
Trigger TR_DW_AUGMENT_TABLES inserts any new Unit Codes into SQL table PIX.PX_UNIT. The PX_UNIT table is used as a temporary table to use and proof Bureau Codes and report flex code before the live R- UNIT table in AdvantageME is updated. The codes are entered with a Complete_Flag set as 'N' to easily identify new rows that need to be reviewed.
inserts any new Program Codes into SQL table PIX.PX_PROG. The PX_prog table is used as a SQL table to provide Bureau Codes to a Program. The AdvantageME R_PROG table does not have a Bureau Code column. Generally Bureau Code would be irrelevant except when reporting on active Programs where a Program only has a Program Budget but no other activity where the R_Unit table could pick up Bureau Code.
TRIGGERS ON TABLE FIN_SESC.dbo.COMPLETION_SESC
Trigger TR_FIN_ALL_ORAEXPAND executes stored procedure ZFA.SESC_ORAEXPAND that will expand the base data collected from Oracle for insertion into table ZFA.FACT_FIN_ALL_SESC. This work is done in SQL to improve run time performance.
The following SQL table FACT_FIN_ALL_SESC columns are populated through this process:
ACCT_PER
BUCKET
OBJECT_CLASS
OBJECT_GROUP OBJREV_CD
PROG_GROUP
PROG2_PER (PERIOD based on program year)
PROG2_QTR (QTR based on program year)
PROG2_YR_NO (Year number for a program with multiple years)
SOURCE_FLAG
REVENUE
TRANSFERS
OBLIGATIONS
EXPENDITURES
ACCRUED_EXP
Trigger TR_FIN_ALL_BFMS_ALLOT executes stored procedure ZFA.SESC_ALLOTMENT that will update the Allotment column in table ZFA.FACT_FIN_ALL_SESC . The Allotment data previously is collected from BFMS through a stored procedure. This procedure deletes and replaces the current budget fiscal year (BFY).
Using the Allotment data from BFMS captures Allotment at the Object Code level, which is not available through AdvantageME or the Oracle financial data warehouse. The data was scrubbed when it was downloaded so that it can be combined with the data from Oracle financial data warehouse.
The data collected or scrubbed for insertion into SQL table ZFA.FACT_FIN_ALL_SESC is as follows:
ACCT_PER
APPROP
BFY
BUCKET (BFMS Bucket number converted to AdvantageME Bucket number)
BFMS_BUCKET_CD
DEPT
BFMS_MO AS FISC_PER (
FISC_QTR
FUND
OBJECT_CLASS
FIN_SESC OVERVIEW Page 7 of 14 Pages Updated 3/31/2014 OBJECT_GROUP
OBJREV_CD
'ALLOT' AS SOURCE_FLAG
EXP_BUDG
REV_BUDG
XFER_BUDG
Trigger TR_FIN_ALL_ORAPROG executes stored procedure ZFA.SESC_ORA_PROGBUD to gather the Program Budget data from the Oracle financial data warehouse and store it in table ZFA.PROGRAM_BUDGET. for further use in the stored procedure ZFA.SESC_PROG_BUDGET
View ZFA.VW_CREATE_PROG_BUDGET is used for the connection to the Oracle financial data warehouse.
The following columns are populated in SQL table ZFA.PROGRAM_BUDGET through this process:
DEPT
PROGRAM
PROG_PERIOD
FUNDING_PROFILE
FUNDING_PRIORITY
FUNDING_LINE
APPROP
FUND
FISC_YR
CURR_BUD_AMT Trigger TR_FIN_ALL_PROG_BUDGET executes stored procedure ZFA.SESC_PROG_BUDGET that will expand the Program Budget data in table table ZFA.PROGRAM_BUDGET and insert it into table FACT_FIN_ALL_SESC.
The following rows are added to SQL table FACT_FIN_ALL_SESC:
APPROP
DEPT
FUND
MJR_PROG
PROG_GROUP
PROG_PERIOD
PROGRAM
'PRGBUD' AS SOURCE_FLAG
CURR_BUD_AMT AS PROG_BUDG
Trigger TR_FIN_ALL_CLEANUP executes stored procedure ZFA.SESC_CLEANUP. This procedure performs routines to scrub data previously entered.
The following data is updated in SQL table FACT_FIN_ALL_SESC:
NULLS are replaced with zeros for all of the columns involving dollars
NULLS are replaced with zeros for Object_Class and Object_Group.
FISC_PERIOD's equal to 13 or 14 are replaced with 12. The 13 and 14 FISC_PERIOD's were collected from the Oracle financial data warehouse and are changed for use in reporting and analysis.
FISC_PERIOD for BFMS Allotment rows is forced to match the use of FISC_PERIOD (PER) in the Oracle financial data warehouse and AdvantageME. The updates use BFMS QTR (1-4) and BFMS_PER (1-3) to convert to format used in AdvantageME (PER 1-12).
FIN_SESC OVERVIEW Page 9 of 14 Pages Updated 3/31/2014 Trigger TR_DW_PARAMETER updates tables for Report Parameter use for speedier opening of reports to the summary report level.
o dbo.RS_PARAMETER [non-Program]
o dbo.RS_PARAMETER_PROG
o dbo.RS_PARAMETER_BUDGET_REVIEW
o dbo.RS_PARAMETER_CONTRACT
o dbo.RS_PARAMETER_CUBE [cube parameter syntax]
TRIGGER LOG for FIN_ALL Processes The results of the work of the Triggers is logged into the SQL table dbo.COMPLETION_SESC
FIN_ALL process log: SQL Table dbo.COMPLETION_SESC
FIN_SESC and SSRS Error Logging Process The SQL stored procedures used for the daily ETL and for populating SSRS reports use Try Blocks to capture additional information on the section of SQL when an error is generated. In the example below a few of the columns available are listed. For each Try Block a unique ErrorType is created to represent a number where the error was generated. This number points you to the exact section of code in the stored procedure that caused the error. In the example below the 2nd and 3rd errors were due to Contract Bureaus being entered more than once for a contract. The row was not added. The other errors were generated during updating reports and while they were being tested.
Any error generated, even for testing or a reporting errror, is listed on the the daily ETL report, This example is representative of the errors generated for FIN_SESC and SSRS.
SSRS LIBRARY
MASTER REPORTS The Master report library for SSRS can be found at the link below: http://ssrs-reports.lb.state.me.us/Reports-sc/Pages/Folder.aspx?ItemPath=%2fSESC%2fSESC+Report+Builder %2fUser+Reports%2fMaster+Reports&ViewMode=List
FIN_SESC OVERVIEW Page 11 of 14 Pages Updated 3/31/2014 Please note that linked SUB REPORTS accessable by all FIN_SESC (_VQL) AD groups are stored in the Primary SESC folder in a hidden folder. This limits their access to the rest of the SESC web page. If you set the page to Details view you will see it.
ADMINISTRATION REPORTS Reports exist to easily review FIN_SESC database permissions, Active Directory Groups for a username, List of Inconsistent DIM table names in AdvantageME (impacts rows in reporting and can be altered in the stored procedure dbo.DW_LOAD_ORA_DIMS for reporting purposes. (This report does not have a SSRS subscription currently for regular review, however it's on the Analysts 'Interested In' list).
Various user frequency reports allow the Service Center admin to monitor usage and non-usage.
The daily reports for Validation, Augmented Data Reconciliation and ETL results are also stored here. SECURITY
OVERVIEW Active Directory is used throughout SQL and SSRS. It is also used to alow downloading of certain data through five SQL stored procedures and providing only the data where AD GROUP permission has been establisthed.
Access to all SQL/SSRS/Network Drives is handled with a single AD Group.
User access to the SQL databases is handled by a single username/password embedded in the reports and server.
The table handling dbo.RS_AD_GROUPS_MEMBERS and is updated through a daily trigger and stored procedure dbo.DW_AD_SECURITY
AD GROUP NAMING CONVENTION All user groups end in _VQL for easier pulling of data from the network. i.e. DOL_BRS_VQL
DAFS_GGSC_DECD_VQL
The table [FIN_SESC].[dbo].[RS_AD_GROUPS] stores the group names created, the bureau and department assigned to it, the Department (DEPT_SH_NM) SSRS Page and Bureau page, and the Service Center the group belongs to. This table becomes the source to pull member information daily and to populate the Security Report on each bureau page to allow the bureau to self-monitor access to their page.
AD GROUP PROPERTIES SSRS PAGE SC
FIN_SESC OVERVIEW Page 13 of 14 Pages Updated 3/31/2014 FIN_SESC SQL Database Access is limited to AD Group access. See the report below for AD_GROUP and report username access.
SSRS Access by AD_Groups using a particular format ending in VQL allowing for a members table to be created. This table provides items like user email addresses by service center.