Playing with the CONNECT storage engine
summary
CONNECT reads and writes external sources (files, remote DBs, REST) as SQL tables and actually demonstrates file-based FMT field_format templates to parse messy Apache logs using scanf‑style %n/%s markers; inward vs outward tables control whether the underlying file is created or preserved. A pivot table type can pivot results pivot from SrcDef query so request types become columns, and virtual columns trim stray brackets. Works but parsing is fragile, error messages are unhelpful, increase connect_work_size cache or import into InnoDB for heavy queries.
AI-written summary · about
chapters (22)
- 0:00Intro
- 0:26Storage engines
- 2:30Connect
- 3:03Table types
- 4:16Overview
- 4:37File tables
- 6:09File names
- 7:14Use cases
- 7:47How to do it
- 9:17Create table
- 9:58Read Apache logs
- 10:29Considerations
- 11:20Creating the table
- 13:46Errors
- 16:37SQL Query
- 16:50Pivot
- 18:02Create tables
- 19:58Pivot column
- 20:49Pivot table
- 22:05Other transformations
- 23:12What did we leave out
- 25:28Final hints
