Bulk functions in the Inflector DuckDB extension
Function category
Bulk
1 functionApply a transform to every key in a struct or every column name in a query result, in a single call. The headline feature for normalizing API responses or migrating between naming conventions.
Signature
4 overloaded forms · click to inspectArguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
format
|
Type
VARCHAR
|
Mode Positional | Description |
Argument
text
|
Type
VARCHAR
|
Mode Positional | Description |
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
format
|
Type
VARCHAR
|
Mode Positional | Description |
Argument
value
|
Type
ANY
|
Mode Positional | Description |
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
col0
|
Type
VARCHAR
|
Mode Positional | Description |
Argument
col1
|
Type
ANY | VARCHAR
2 concrete typesANYVARCHAR
|
Mode Positional | Description |
Argument
col2
|
Type
BOOLEAN
|
Mode Positional | Description |
Return type varies by input — 2 concrete types
ANYVARCHAR
Arguments
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
format
|
Type
VARCHAR
|
Mode Named | Description |
Argument
query
|
Type
TABLE
|
Mode Named | Description |
Argument
col2
|
Type
BOOLEAN
|
Mode Positional | Description |
Description
Apply a named transform ('camel', 'snake', 'pascal', 'kebab', etc.) to one of: a string, every key in a struct, or every column name in a query result. The headline function for renaming a whole shape in one call.
1
Rewrite struct keys
SELECT inflect('snake', {'firstName':'John','lastName':'Doe'});
2
Rewrite every column of a query
SELECT * FROM inflect('kebab', (FROM read_csv('data.csv')));