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:

  1. 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

  2. Use the Specific Build:

    • egovio/bulk-upload:UAT-f91e96b8-18

    • click here to access the branch and change details

  3. 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.

curl --location 'localhost:8098/bulk-upload/_bulkUpload?schemaCode=WORKS-SOR.Rates&tenantId=pg.citya' \
--form 'file=@"/path/to/file"'
  1. 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

  1. Clone DIGIT-Works repository in your local https://github.com/egovernments/Digit-works

  2. Checkout to the branch sor-composition-migration

  3. Port-forward MDMS-v2

  4. Update these details in .env

    1. MDMS_V2_HOST url

    2. MDMS_v2_SOR_COMPOSITION_CREATE url if it's changed - Make sure that WORKS-SOR.Composition schema is created

  5. Install dependencies on your local pip3 install -f requirements.txt

  6. Run main.py file

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.