Data Migration
Rates Migration to SOR
This migration is mukta-specific only.
To convert Labour Skills rates to SOR rates in MDMS-v2, we need to map skill_codes to sorId. We'll use skill_codes to get rates from MDMS v1 and sorId to upload them into MDMS v2. Upload an Excel file in the required format and execute the curl command. Note: The migration script is already present in our earlier build; only the input file will be changed.
Migration Steps
To migrate skills rate follow the steps given below:
Create skill_codes and sorId mapping :
An Excel sheet is with fields (heads, rates as total, Sor Id, Valid From, and Valid To). Example:
LC.7 MHA.3 ADC.4 CA.9 EMF.6 DMF.5 MA.2 LA.1 RA.8 Total Sor Id Valid From Valid To 0
0
0
0
0
0
0
345
0
345
SOR_000290
22-04-2023
30-09-2023
Use the Specific Build:
egovio/bulk-upload:UAT-f91e96b8-18
click here to access the branch and change details
Build and Deploy:
Deploy the build provided above or build and deploy from the code linked above if custom changes are required.
Upload the Excel file in the body.
Use the curl below to migrate the data.
Verification in DB: Query on the eg_mdms_data table and check if the Rates uploaded are present in the data. Example: select * from eg_mdms_data where schemacode ='WORKS-SOR.Rates' and data- >>'sorId' = 'Eg.SOR_000002';
Upload SOR Composition
Works SOR requires SOR Composition, for existing SORs it requires uploading data using script.
Migration Steps
Clone DIGIT-Works repository in your local https://github.com/egovernments/Digit-works
Checkout to the branch
sor-composition-migration
Create an excel file same as below sheet and fill the details https://github.com/egovernments/DIGIT-Works/blob/sor-composition-migration/utilities/sor-composition/Rate_analysis_for_composition.xlsx
Port-forward MDMS-v2
Update these details in .env
MDMS_V2_HOST url
MDMS_v2_SOR_COMPOSITION_CREATE url if it's changed - Make sure that
WORKS-SOR.Composition
schema is created
Install dependencies on your local
pip3 install -f requirements.txt
Run
main.py
file
Last updated