In ReadyWorks, lookup values can be automatically generated and populated through data mappings and asset management processes. This functionality is crucial when dealing with large sets of dynamic data, such as location lists, IP addresses, or device attributes. By automating the creation of these lookup values, ReadyWorks simplifies data integration and enables efficient filtering and reporting.
Steps for Auto-Creation of Lookup Values:
Data Mapping to a Lookup Field:
- In ReadyWorks, when data is mapped to an asset table with lookup fields (e.g., location, IP address), the system can automatically create new entries for lookup values if they do not already exist. This process ensures that each value in the source data has a corresponding entry in the target lookup table.
- As you define your data mapping, you can map source data fields directly to lookup fields in the target asset type. ReadyWorks will add new values to these lists as part of the mapping process.
Example: If you map a field such as “Location” from your source data to the “Location” list in ReadyWorks, new location records will be automatically created in the lookup table if they do not already exist.
Enable Auto-Creation:
- During the data mapping setup, ensure that the configuration allows for the automatic addition of new records. This can typically be toggled when defining the mapping properties. You can set it to automatically add new lookup values as they are encountered in the incoming data.
Steps:
- Go to Admin > Configuration > Data Mapping.
- In your data mapping task, select the field that needs to be mapped to a lookup list.
- Make sure that the option to “Auto-create new records” (or similar toggle) is enabled to allow ReadyWorks to generate new lookup values.
Data Mapping Execution:
- Once the data mapping is configured, you can execute the job to start importing data. During this process, ReadyWorks will check if the mapped values exist in the lookup list. If they do not, it will automatically add the new entries.
- After the data mapping completes, you can verify the newly created lookup values by reviewing the corresponding list under Admin > Configuration > Lists.
Avoiding Duplicates:
- ReadyWorks uses a unique identification mechanism to prevent the creation of duplicate entries within lookup lists. This ensures that if the same value (e.g., a location or IP address) appears multiple times in the source data, it will only be added once to the lookup list, even if referenced by multiple records.
Note: You can run a test data mapping with sample data to confirm that no duplicate entries are created in the lookup list.
Best Practices:
Testing Data Mapping:
Before running data mappings on large datasets, it is advisable to run a test job using a subset of your data. This allows you to verify the behavior of auto-creating lookup values and to ensure that there are no unexpected duplicates or errors.
Regular Data Mapping Schedules:
Set up scheduled data mapping jobs (via Cron jobs) to keep your lookup lists updated with the latest data from your source systems. This ensures that lookup fields, such as locations, are always current without manual intervention.
Reviewing and Maintaining Lookup Lists:
Regularly review lookup lists to ensure data integrity. While ReadyWorks prevents duplicates, it’s important to periodically validate that the lists contain all necessary and valid entries to support reporting and other workflows.
Example Scenario:
You are tasked with integrating location data from an external signage system. In the source system, locations are recorded as text strings. By setting up a data mapping job to map these locations to the “Location” lookup field in ReadyWorks, you can automatically generate new location entries. If the data mapping encounters a new location, it will create a corresponding entry in the Location list, which can later be used for filtering and reporting.
Tips and Tricks:
“Whenever you write values to a list, the data mapping will automatically add new records to the list as needed.”
Troubleshooting:
- If lookup values are not being created as expected, verify that the data mapping configuration allows for the creation of new records.
- Review the execution logs of the data mapping job to ensure it completed successfully and processed the new data.
- Ensure that the source data is correctly formatted and that the mapped field corresponds to the correct lookup field in the target asset type.
By automating the creation of lookup values, ReadyWorks streamlines the process of managing large, dynamic datasets, enabling faster workflows and more accurate reporting.