form
Description
One application/x-www-form-urlencoded record: key=value&key=value. Percent escapes and plus-as-space decoding apply to values. file() can infer String columns when no explicit schema is supplied.
Only values are URL-decoded; keys retain their literal spelling, including dots and percent sequences. Repeated keys are rejected, ignoring ASCII case. A final LF or CRLF may terminate the record.
Input only. Select it with FORMAT form. Names ignore ASCII case; use the snake_case name shown here.
The input represents one row of key/value pairs, rather than a stream of several records. Values decode percent escapes and plus signs; keys keep their literal spelling. Repeated keys are rejected without regard to ASCII case.
A file() source can infer String fields from nonempty input. Supply an explicit schema to choose native conversions or to describe an empty form. The format has no output encoder.
INSERT INTO table [(columns)] [SETTINGS ...] FORMAT form
<data>Example usage
SELECT name,is_input,is_output FROM system.formats WHERE name='form' FORMAT csv;"form",1,0Example input: id=7&name=Ada+Lovelace.
Format settings
Use a statement SETTINGS clause; these options are not persisted by SET.
| Setting | Type | Default | Meaning |
|---|---|---|---|
ignore_unknown_fields |
Bool |
0 |
Skip input keys and header names that match no target column instead of failing. |
snappy_mode |
String |
basic |
Read Snappy client files as basic (Hadoop blocks) or framed (standard streaming format). |
Load rows
Run the INSERT request separately; its remaining bytes are input data.
CREATE TABLE form_input(id UInt8,name String);OKINSERT INTO form_input FORMAT form
id=7&name=Ada+LovelaceOKSELECT * FROM form_input FORMAT csv;7,"Ada Lovelace"