Import two CSV files into LibreOffice Base, and query the data

I’m trying to import two large (3.6M rows) CSV files into Base with the intent of querying them via a simple inner join. I opened them as an “Existing Database” using the the Text type. I can query them, but only one at a time. Using the query wizard, it won’t let me add a second table. Using SQL it outright tells me that the query failed because there was more than one table.

Assuming this is a limitation with the Text database type, I created a new database and tried the following suggestions that I found on this site:

  1. Import the tables by dragging them from my text database to the new database. This gives the error “Invalid Descriptor Index”.

  2. Import via cut and paste from Calc. This won’t work because there are too many rows in my CSV files.

Suggestions?

Base is NOT a database. It is a tool to work with databases.
If you have some database up and running (for instance a MySQL server) just use it.
If Base is the one and only database tool your have and there is no database around:

  1. Disable Tools>Options>Advanced>Experimental features (otherwise you get the wrong type of database)
  2. Create a new empty Base database (status bar reads “HSQLDB embedded”)
  3. Create a text table according to this tutorial: [Tutorial] Using csv/text files as editable data source.
  4. Create a real database table.
  5. Copy the linked text table, select the real table’s icon and paste. Choose “Append data”.