Is there a way to parallelize a connection for exa...
# replication-troubleshooting
j
Is there a way to parallelize a connection for example from one MySQL db to another, maybe from the command line, so that each table is uploaded in parallel? It's fine if the approach sacrifices a bit of consistency. Currently using airbyte a single connection takes +4 hours.
w
You could potentially have multiple connections, with each one attempting to load a subset of the data/a single table, but if the operations are on a single table, depending on the indexing, the table could get read/write locked which would slow down any write operations. I am not super up to speed on MySQL best practices for bulk data loads, but there may be a way to push airbyte data into a new table before merging it into the real table via a local scheduled process. Airbyte does something similar to this when it uses tmp tables.
j
@Walker Philips Thanks! I think loading one table per connection/process would be enough as a first step. We probably don't need parallelizeation on the column level, even though that could be quite interesting as well. I can manually create one connection for each table, but that seems veeery bothersome and unmaintainable. So I am looking for a programmatic or at least more generic approach!
I'd love to be able to run a script like
Copy code
tables = airbyte get-tables my_connection
for table in tables:
    airbyte execute my_connection table
n
Thanks for being such an active part of the community, @Walker Philips! Johannes, have you used the Airbyte API yet?
j
@Nataly Merezhuk (Airbyte) I only started using Airbyte recently. I will look into it today. Do you think that it would address my use case?
@Nataly Merezhuk (Airbyte) According to https://docs.airbyte.com/api-documentation/ the API is in closed beta and only av for Cloud users? And I don't see any actual documentation 😄
It would be great if you can give me some more pointers
n
The API is available for OSS instances, here are the API docs: https://airbyte-public-api-docs.s3.us-east-2.amazonaws.com/rapidoc-api-docs.html#servers
j
@Nataly Merezhuk (Airbyte) Cool. Could you elaborate? Is the idea to get all tables from the connection and iterate over the tables, updating the connection via POST /v1/connections/update to the current table and start the connection in the background?