Preparing Test Data and Sample Files

How to:

This section describes how to prepare test data and sample files.


Top of page

x
Procedure: How to Prepare a Database Target Table to Populate With Sample Data

To prepare a database target table to populate with sample data:

  1. Identify a test target database where a table can be created and populated with data.

    To use a predefined sample XML document, employee table definition, and other sample data for this tutorial, see Sample Documents.

  2. Using a third-party query tool, connect to the database and create the Emp (employees) table.

    To view a sample employee table definition, see Employee Table Data Definition.

  3. Using the same third-party query tool, prepare an SQL Insert statement with hard-coded column values.

    Later in this tutorial, you will replace the hard-coded values with parameter names. Be aware of database engine SQL syntax variations for string delimiters, dates, numbers, function calls, and columns that can accept a NULL value.

    Note: The sample SQL Insert statement that is provided in Sample Documents may not be syntactically correct for your database.

  4. Test the Insert statement and verify that data was added to the table. Save the successful syntax version of the SQL Insert statement for later use. Clear test data from the Employees table using a delete or truncate statement.
  5. Verify that iWay Service Manager (ISM) can connect to the database.

    One method is to define and test a Data Provider from the iSM Administration Console. Driver and URL information defined here can be referenced when creating an SQL Object in later steps.


Top of page

x
Procedure: How to Prepare Sample Files and Folders

Since you will be creating several text documents for reference and processing, create a set of folders on the iSM host system to store them.

  1. In the file system, create a folder called xml2tbl with three subfolders (in, out, and processed). For example:
    C:\xml2tbl\in
    C:\xml2tbl\out
    C:\xml2tbl\processed
  2. Save the documents that are created in the next steps in the xml2table folder.

    Ensure that the subfolders remain empty.

  3. Using a text editor or other utility, create and save a copy of the EmpData.xml sample XML document in the xml2tbl folder.

    To view a copy of the EmpData.xml sample XML document, see Employee XML Document (EmpData.xml).

  4. Using the sample XML document (EmpData.xml), create the property file (EmpMetadata.txt) to define property names and data types for each node.

    The property names that you define here will be used as parameters with the SQL Insert statement that you previously prepared. A recommended property naming convention is to prefix a lower case 'x' to the node name. This convention associates the property with the node name while distinguishing it. You can use your own naming convention. However, you must ensure that it is consistent.

  5. Save the property names and data types in the EmpMetadata.txt file in the xml2tbl folder for future reference.

iWay Software