From Inistate to SQL Database

Things to Take Note

When performing integration between Inistate and a SQL database, ensure the following steps and validations are followed:

1. Mapping File Preparation

  • Prepare a mapping file that defines how each field from Inistate corresponds to the SQL database columns.

  • Ensure that all required fields are included in the mapping file.

  • Double-check that optional fields are also handled properly to avoid missing data.

2. Data Type Validation

  • Verify that each mapped field matches the data type defined in the SQL database.

  • Examples:

    • Text → VARCHAR, NVARCHAR

    • Integer, Number → INT, DECIMAL

    • Date Time, Date → DATETIME, DATE

  • Ensure that the data from Inistate does not conflict with SQL type restrictions (e.g., trying to insert a string into a numeric field).

3. Value Length Check

  • Validate the maximum length allowed by the SQL database for each column.

  • Example:

    • VARCHAR(50) → Ensure the incoming string is 50 characters or less.

  • Truncate or handle values exceeding the defined length to avoid insertion errors.

4. Null & Default Handling

  • Check whether the SQL column allows NULL values.

  • If not, ensure default values are provided during integration.

5. Data Integrity & Constraints

  • Validate data against primary keys, foreign keys, and unique constraints.

  • Ensure that reference data exists before inserting dependent records.

Sample Code

circle-info

To find {fieldName}, you are required to have access to Alpha or use Network in Developer Tools [F12].

circle-exclamation
circle-exclamation

Sample SQL Template

circle-info

circle-exclamation

Jobs json

The jobs.json file defines the set of connector tasks to run during integration.

Each job entry specifies:

  • name: Logical name of the task.

  • enabled: true/false to turn this job on or off.

  • connectionString: A valid ADO-style string.

  • debug: Enable detailed logging.

  • sqlTemplate: Your SQL template script to select changed records.

  • hook: The callback URL to receive each batch of synced rows.

  • lastSync: Timestamp of the last run.

  • interval: Polling interval in minutes.

Last updated