This article explains how to push data from ipushpull into a database using the DataLoader.
Note that configuring this process requires knowledge of SQL. The DataLoader does not know whether the data in the ipushpull page should be used to update existing rows in your db table, or if the data should be inserted into the table as new rows. It also does not know the relationship between the columns in the ipushpull page and the fields in your db table. You, and/or your database administrator, do know this.
Therefore, to load data from an ipp page into your database you need to create a dedicated stored procedure which consumes the data from ipushpull and performs your appropriate business logic. The DataLoader will send the ipushpull data to your stored proc in JSON format. Your stored procedure should then process the json and insert/update your database according to your requirements.
See this page for data formats and example stored procedures for a variety of databases.
1. Set up, login and configure the loader for your database
See this article to find out how to install the DataLoader, login and configure your data sources.
2. Configure a Pull from ipushpull and a Push into your database
Select the ipushpull to Database tab. Each row defines a pull from an ipushpull page and an associated stored procedure to send data to in your database.
- Enter a custom name for your pull in the Name column to help you identify it later
- Use the Folder and Page dropdowns to choose the ipushpull page whose data you want to push into your database
- Select your Data source from the dropdown, then enter the name of your Stored procedure
For example, in this case we are pushing the contents of page Demo|DBDemo into the database using a stored proc called usp_InsertTrade:
3. Choose whether to include headers
If you want to include the top row of your ipp page in the data you send to your database, tick the Headers checkbox. Otherwise untick it.
4. How to Push into your database once
To push a snapshot of the data in your page into your database, press the Pull button once.
5. How to Push into your database at regular intervals
To push at regular intervals press the Start button. This will pull data from the ipushpull page at the interval specified (in the example above it's 60 seconds) and send the data to your stored procedure.
6. Checking for results
Regardless of whether you have pushed once or at an interval, the Pull status field will display the result of your last pull. If successful, it will show the time of the last successful pull and number of rows affected, as returned by the database. Note that the precise message is database-dependent and may not actually represent the number of rows affected. You will need to understand your database's behaviour to interpret this correctly. For example, in some cases it may just show -1 to indicate success. If there were any problems executing the stored procedure the error message returned by the database will be displayed.
This page describes the data format the DataLoader sends to the stored procedure and example stored procs for a variety of databases.