About the Adapter Tool
The adapter tool is a powerful feature designed to validate data and compatibility between the steps of your analysis. By using the adapter tool, you can verify that the input data matches the schema expected by the next step of your analysis, guaranteeing that downstream steps in your process have the correct column names and data types. In this guide, we will walk you through the process of setting up and configuring the adapter tool to effectively validate your data.
To begin, add an Adapter tool to your Canvas.
Tick the box to Pass through Unmapped Fields: This will ensure that any new fields in subsequent datasets are passed through the Adapter tool and downstream in the Analysis.
Bootstrap the Adapter tool: This action sets the schema of the input as the required configurations of the Adapter tool.
Take a look at the Field Mappings section: When unlocked, you'll find field specifications. When locked, these field specifications will be locked.
You can now specify the Field Specifications:
Choose a Field Name to be used in the Analysis.
Select Required if you need the field to exist in the dataset subsequent to the Adapter tool.
Select the Data Type to specify the data type of the field.
Choose the Mapped From field that is assigned to the current specified field in the configuration.
Finally, click Apply.
Bootstrapping the Adapter Tool
To begin using the adapter tool, the first step is to bootstrap it. This is done by clicking the bootstrap button, typically located within the tool's interface. When you initiate the bootstrap process, the tool analyzes the schema and data from the input source, converting them into the requirements for the adapter.
During this process, you have several options to consider. For example, if there are unmatched fields between the adapter's expected fields and the CSV file you are using, you can choose whether those fields should be passed through or not. This configuration gives you flexibility in handling field mismatches.
Additionally, you can edit the configuration by clicking the corresponding button. This allows you to specify which fields are required.
Linking New Data to the Adapter Tool
Once you have set up the adapter tool using the bootstrap process, the next step is to link new data to it. Suppose your analysis involves reading data from a file system or using a template. In that case, this step becomes crucial in ensuring that the adapter tool processes the correct information.
To link new data, you need to remove the existing data source and add a different data set.
When you look at the adapter tool after linking the new data, you will notice that some fields have been automatically mapped over. This means that the adapter recognized matching fields between the previous and new data sets.
However, some fields may require manual mapping. You can identify these unmapped fields by reviewing the adapter's interface.
To map a field, simply locate it in the new data set and connect it to the appropriate field in the adapter. In cases where a field is missing or not applicable, you can leave it unmapped. Once you have made the necessary mappings, click the apply button to save the changes.
After applying the mappings, the adapter tool will have the output it expects, including only the mapped fields. This step ensures that the adapter processes the data correctly according to your requirements.
Ensuring Successful Data Validation
By mapping the fields correctly, you can avoid errors during the data validation process. For example, if an essential field like email is left unmapped or blank, it will trigger an error. To prevent this, ensure that all required fields are mapped appropriately before proceeding with further steps.
If you encounter any issues or require further assistance, consult the tool's documentation or reach out to our support team for personalized guidance. Happy data validation!