How to verify the adapter configuration settings and run the local adapter.
Adding the Schema File
Prior to running the adapter for the first time place the agency specific schema mapping file in the ./deposit folder located in the root directory. All schema files, similar to CSV files MUST be added to the ./depositfolder in the root directory.
For first time use, if the ./deposit folder does not yet exist. Run the script below and then kill the terminal session.
The ./deposit and ./results directory will be auto-generated after the following script has been executed for the first time (e.g. running the executable).
~/root_directory_location
./fresno-adapter
The ./deposit and ./results folders will persist after you kill the executable or shell session.
Verifying the Configuration
Prior to running the executable enter the root directory and open the ./Settings.toml to verify the project settings are configured properly.
~/root_directory
cat Settings.toml
The ./Settings.toml file should display the following information:
In this file, verify that the URL on the first line matches the following:
If the URL in the file does not match"https://sandbox.attest.id/v1", edit the file and change the URL to the one listed above. Make sure to only change the URL, do not change the variable in front of it, attest_api_url.
Running the Adapter
Running the adapter is simple and only requires entering the root directory and executing the following script:
Running this script will start the executable locally. If started successfully, the terminal should display the following start screen:
The adapter is now running locally and waiting for an import file to be dropped in the ./deposit folder
Depositing the Import File
Place the import file in the ./deposit folder located in the root directory:
After depositing the import file the resolution adapter will read, cleanse and parse the records in the CSV import file.
After processing the records locally, the adapter will send records to the hosted resolution API in batches of 1,000:
Records will be matched/resolved against existing records in the database until the entire import file is fully resolved:
Implementors can upload additional import files to the local adapter or choose to kill the terminal session and executable running.
Batching records
For testing purposes, DO NOT load data sets in groups larger than 25,000-50,000 records.
The API and adapter can handle much more throughput, however, 300K+ records will take a fair bit of time to process and may be susceptible to a local network timeout.
Deposit Errors
1. Missing Schema
Depositing a CSV without a corresponding schema file will return the following error:
2. Mismatched File Names
As noted in the naming conventions section a mismatch in the schema and import file name will return the following error:
3. Stopping the service while running:
Stopping the adapter while running, will not impact the results of the identity resolution process. Each resolution output file will contain a timestamp at the end of the file name.
:-------------------------------------------------------------:
:. Fresno Identity Resolution .:
:-------------------------------------------------------------:
: -> Agency ed25519 Public Key: :
: atl0FG2JkPGhbvdyKgq1X1DjIAF3N308LalQwHBaUlg :
:-------------------------------------------------------------:
:= Waiting for file to be dropped in the directory: "./deposit"
Reading 4943 records for Identity Resolution:
██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ 4943/4943
Reading 4943 records for Identity Resolution:
██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ 4943/4943
Resolving 4943 records in batches of 1000:
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0/4943
Reading 4943 records for Identity Resolution:
██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ 4943/4943
Resolving 4943 records in batches of 1000:
██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ 4943/4943
-> Completed identity resolution, check the results directory for files.
Issue processing file: The schema file "fusd_02_10_2020.json" for "fusd_02_10_2020.csv" does not exist, please ensure it exists before depositing the CSV.
Issue processing file: The schema file "fph_02_10_2020.json" for "fph_02_10_2020.csv" does not exist, please ensure it exists before depositing the CSV.