Zend certified PHP/Magento developer

Magento 2 Cloud – Upload SQL script file to server and import into custom database table

I’m trying to import a SQL script file into a Magento cloud database.

The script file has about 83k lines of insert statements and it populates one table in the database.

My current progress:

I managed to connect to the remote database using ssh tunneling as explained in the Magento Cloud docs here.

The problem I’m facing is the ssh tunnel connection takes about 3 minutes to complete 800 inserts. You can imagine how long this process will take.

Question:

I would like to know if there is a way for me to upload the SQL script to the remote server and run the import via the CLI instead, which will be faster.

Thanks in advance.