Sequin syncs data from the API to your Postgres database. In order to write data back to the API, you’ll connect to your database via Sequin’s Postgres Proxy.
insert
insert
command. Here’s how to insert a Salesforce contact
:
Platform | Max inserts per query |
---|---|
Airtable | 10 |
HubSpot | 1 |
Salesforce | 200 |
Stripe | 100 |
GitHub | 100 |
update
update
command. Here’s how to update a Salesforce contact
:
Platform | Max updates per query |
---|---|
Airtable | 10 |
HubSpot | 100 |
Salesforce | 200 |
Stripe | 100 |
GitHub | 100 |
delete
delete
command. Here’s how to delete a Salesforce contact
:
Platform | Max deletes per query |
---|---|
Airtable | 10 |
HubSpot | 100 |
Salesforce | 200 |
Stripe | 100 |
GitHub | 100 |
insert
, update
, or delete
command. For larger mutations, batch your mutations in your code and apply the smaller batches to your database.
insert into ... on conflict do update
). That’s because they can trigger more than one API request per mutation (e.g. one insert request and one update request). Instead, we recommend doing an insert
with on conflict do nothing
followed by an update
.
insert
command runs, the insert will be applied to the API and the database outside the transaction. This means the rollback
has no effect, as the insert
has already been committed.
In other words, mutations to Sequin-synced tables “escape” the transaction.
Ignoring Postgres transactions is unusual, and may require you to rethink how you architect certain workflows. But APIs don’t typically support transactions, so Postgres’ transaction model does not fit neatly into Sequin’s mutation paradigm. (See Considerations for more details on the Proxy’s design principles.)
us-west-2
region in Oregon. We’ll be adding additional regions in the near future.
If you’re far away from the us-west-2
region, this will add a little additional latency to each of your queries.
inserts
, updates
, and deletes
must be made through the Proxy.
insert
, update
, and delete
) to Sequin-synced tables should always flow through the Proxy.
For reads (select
), we recommend starting out using the Proxy to read from your Sequin-synced tables. Then, as you build your integration, you may consider moving certain read queries or read workflows over to a direct connection to your database.
That’s because for reads, Sequin’s Proxy provides no benefit at the moment. The Proxy’s purpose is to handle mutations. Therefore, reads will be faster on a direct connection, as they’ll avoid the extra hop.
We do not recommend using the Proxy as your primary method to query tables that are not synced by Sequin. These tables are safe to query through the Proxy, but the Proxy will be slower than a direct connection and not provide any benefit for queries to non-Sequin tables.