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.