SQL

VALUES

Local import on homebrew mysql

Splitting a large .sql dump into multiple files

VALUES

VALUES lets you create an ad-hoc list.

SELECT * FROM (VALUES (1, 'A'), (2, 'b'), (3, 'C')) AS foo (num, title)

returns:

num | title
1 | A
2 | b
3 | C

It is nice to be able to make a VALUES list to pass in a list you want to filter by with a readable value and an ID for joining, then LEFT JOIN with the other tables to pull in the data you are interested in.

Docs for VALUES:

From the Trino engine, which is one of the two being used in Hue.

MySQL

SQL Server

PostgreSQL

Local import on homebrew mysql

$ mysql -u root DBNAME < sqlfilename.sql

Though if you are using WordPress and wp-cli, it is easier to do wp db import FILEPATH

Splitting a large .sql dump into multiple files

Use https://philiplb.de/sqldumpsplitter3/