Script variable settings
Variable settings in the METADATA_WDSETTINGS table are required information for
executing the integration scripts.
These settings include information such as configuration set, version, configuration set start and end date, employee dynamic attributes, planning frequency, driver type, and upload type.
- In SQL Server Management Studio, go to Integration database and edit the METADATA _WDSETTINGS table.
-
Specify the variables in the [METADATA_WDSETTINGS] section. The
variables must match your specific settings and include the specifics of the
upload.
update [METADATA_WDSETTINGS] set value = '71' where variable = 'max_element_length' update [METADATA_WDSETTINGS] set value = 'dEPMInteg' where variable = 'source_db' update [METADATA_WDSETTINGS] set value = 'CYCLE_001' where variable = 'bpdconfiguration set' update [METADATA_WDSETTINGS] set value = '2017-01-01' where variable = 'startconfiguration set' update [METADATA_WDSETTINGS] set value = '2018-12-31' where variable = 'endconfiguration set' update [METADATA_WDSETTINGS] set value = 'weekly' where variable = 'frequency' update [METADATA_WDSETTINGS] set value = 'Employee_ID' where variable = 'emplBasic' update [METADATA_WDSETTINGS] set value = 'First Name, Last Name' where variable = 'emplDA' update [METADATA_WDSETTINGS] set value = 'upload_type' where variable = 'Additive'
The supported values for 'frequency' variable are: weekly, bi-weekly, monthly, quarterly, or yearly.
-
Specify the driver type for every driver which records are to be imported. The
supported values for driver_type variable are:
Option Description NonF-NonP Non-forecasted, non-propagated drivers NonF-P Non-forecasted, propagated drivers F Forecasted, propagated drivers - Optionally, if you are replacing existing records in the WDCDRIVER cube, select the Replacement for the upload_type variable.
-
Execute this script:
DECLARE @errors nvarchar(max) = ''; --Workforce Planning update METADATA_WDSETTINGS set value = ISNULL((select top 1 SUBSTRING(a.TEXTVALUE, 14, 10) from EXPORT_ATT_WDCCONFIG a left join EXPORT_ATT_ATCDATA_CALC_METHOD b on a.WDDCALC_METHOD = b.WDDCALC_METHOD where b.TEXTVALUE = '[ATDLIST].[FREQUENCY].[FREQUENCY_' + @frequency + '].[1]' and a.BPDPARAMETER = 'SUBPLAN_WFD_CURRENT_PERIOD'), '') where variable = 'wddperiod' EXEC depm_integration_wp_employee_custom_prepare_staging EXEC depm_integration_wp_employee_custom EXEC depm_integration_wp_driver_prepare_staging EXEC depm_integration_wp_driver EXEC depm_integration_wp_calculation_prepare_staging EXEC depm_integration_wp_calculation GO