- Automatically import and sync sales transactions to your workspace
- We support any SQL query as long as we can incrementally retrieve data (details below)
- Newly created PostgreSQL records will be synched to your workspace
- Modified PostgreSQL records will be updated in your workspace
- Deletion of PostgreSQL records will not result in any deletion in your workspace
- PostgreSQL records no longer matching your SQL query will not result in any deletion in your workspace
To add a PostgreSQL connection, go to Settings > Connections and click on Add for PostgreSQL:
Next, enter your user name, password, host name, port, and database.
Please make sure the chosen account has permission to read from the SQL tables you want to access. You'll see the following:
Next, click on Transaction > Add Transactions and select PostgreSQL.
Here is a sample SQL query:
SELECT * FROM public.MyTable WHERE Updated >= @Threshold ORDER BY Updated ASC
Your SQL query must allow for incremental data retrieval based on a last modified date:
- Your table should have a update field tracking when each record was last modified.
- In the example above, the field is called "Updated", but it could be named something else (ex: "Last Modified", "Last Updated On", etc.).
- When a record is created, the update field should also be set.
- We recommend that you use a timestamp (not a basic date) to track the last modified date.
- Your SELECT statement should include the update field - examples.
- "SELECT *" works because it includes the update field.
- "SELECT Updated, Amount" works because it includes the update field.
- "SELECT Amount" does NOT work because it does NOT include the update field.
- Your WHERE statement should include an AND condition with update field >= @Threshold - examples.
- "WHERE Updated >= @Threshold" works because it has a condition on the update field.
- "WHERE Amount > 2000 AND Updated >= @Threshold" works because it has an AND condition on the update field.
- "WHERE Amount > 2000" does NOT work because it does NOT have a condition on the update field.
- "WHERE Amount > 2000 OR Updated >= @Threshold" does NOT work because it has an OR condition on the update field.
- Your ORDER BY statement should include a primary ordering by update field ascending - examples.
- "ORDER BY Updated ASC, " works because it has primary ordering by update field ascending.
- "ORDER BY Updated ASC, Id DESC" works because it has primary ordering by update field ascending.
- "ORDER BY ID ASC" does NOT work because it does NOT have primary ordering by update field ascending.
- "ORDER BY ID ASC, Updated ASC" does NOT work because it does NOT have primary ordering by update field ascending.
To learn more about connections, click here.
To learn more about managing synchronizations, click here.
To learn more about importing transactions, click here.