title: Quick start: your first interface description: "Build an interface that reads a delimited file, maps its fields and writes each record to a database through a stored procedure. You'll test it locally and deploy it to the server."
Quick start: your first interface¶
Build an interface that reads a delimited file, maps its fields and writes each record to a database through a stored procedure. You'll test it locally and deploy it to the server.
You will need
- The i-Con Client installed and connected to IConDb
- A sample CSV file and a SQL Server stored procedure that inserts one record
- Access to an i-Con Server to deploy to
Build the interface¶
- Create the interface
Select File → New (or New Project on the start screen). In the New Project dialog, enter an Interface Name, for exampleInbound_Payment_Processor, and choose a Location. Use a dedicated folder for each project, because i-Con stores all the project's files there. - Add the components
From the Toolbox, drag these onto the canvas: a source: FileIn (File I/O group) a conversion: TextMapping a destination: SqlProcedure (Data group) - Configure each component
Select a component and fill in its properties in the Properties window. SetEndPointtoSourceon the file reader, and set its incoming path, file filter andFieldSeparator. Set the field mapping for TextMapping, and the connection string and procedure name for SqlProcedure. Refer to fields with macros such as{Data(1)}(see Macro expressions). - Put settings in the Common Store
Select the project in the Solution tab, openCommonStoreand add values such as paths and connection details askey=valuelines. Use them in components as{key}, so you can change them in one place when you move to the server. - Link the components
Turn on Linking Mode (toolbar button, or Project → Link Components). Drag from FileIn to TextMapping, then from TextMapping to SqlProcedure. New links are Pass Through by default. Turn Linking Mode off when you're done. - Handle errors
Add an alerting component, such as an email (SMTP) component, and draw a link to it from each component that can fail. Select each of those links and setLinkTypetoError. - Set the starting component
Select the project in the Solution tab and setInitialComponentto the file reader. The server can't start the interface without it. - Test locally
Select the file reader on the canvas, then press F5 (or Debug → Run). The run starts from the selected component, which must be a Source. Watch the Output window's Logging, Errors, Counters and store tabs, and check that the records arrive in the database. A component that fails turns red on the canvas. - Deploy to the server
Select Build → Upload to Server, enter the server name and select Upload. The upload becomes a new version of the interface. - Start it
In the Interface Manager, select the interface and select Start. Check that its heartbeat increases.
Next steps¶
- Learn the link types to add branching and parallel processing.
- Store shared values in the Common Store.
- Read Deploy and version interfaces before you go to production.