Reserved Word Column Name Flagger
Exact case-insensitive caller SQL-dialect reserved-token flags; quoting rules and full SQL validity omitted.
Description
Reserved Word Column Name Flagger: return flagged column indices, dialect edition.
A CSV column name can collide with a reserved token when imported into a particular SQL dialect. The dialect and its token list must be declared.
This tool returns flagged column indices, dialect edition. Use the stated units and model convention when interpreting these fields.
When to use this tool
Use this tool when the supplied inputs match the specific operation described above and you need a repeatable result under its stated convention.
- Check the supported input and output contract against an existing calculation or observation.
- Use the complete example to confirm units, selector spelling and result interpretation.
How to use the tool and how it works
- Enter every field in the input table using the stated units and the exact supported selector spelling where applicable.
- Run the tool. Correct input errors before interpreting an output.
- Read the result fields below; use accompanying flags and the stated sign, boundary or model convention when interpreting a number.
Require a nonblank dialect edition and reserved-word list. Uppercase tokens and column names for exact membership tests, returning zero-based flagged column indices.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| columnNames | Column names. | List of text values |
| callerReservedWords | Caller reserved words. | List of text values |
| callerDialectEdition | Caller dialect edition. | Text |
| Output field | Interpretation |
|---|---|
| result | Object containing the following named result fields. |
| result.flaggedColumnIndices | Flagged column indices list, in the ordering described in the calculation. |
| result.dialectEdition | Dialect edition; use the stated units and sign convention. |
{
"input": {
"columnNames": [
"id",
"select",
"name"
],
"callerReservedWords": [
"SELECT",
"FROM"
],
"callerDialectEdition": "illustrative-dialect/edition"
},
"output": {
"result": {
"flaggedColumnIndices": [
1
],
"dialectEdition": "illustrative-dialect/edition"
}
}
} Limitations and assumptions
- Whitespace is not trimmed for matching, and quoting rules or contextual SQL grammar are not parsed.
- Every declared field is required and unexpected fields are rejected. Numeric inputs must be finite; input errors are distinct from a valid false result or an explicitly qualified output.
- Extremely large inputs and nonfinite or excessively large outputs are rejected. List positions reported by the tool use zero-based indices unless stated otherwise.
Alternative or Complementary methods
Check the underlying observations, units and conventions independently before using the result in a larger workflow. The tools listed below address nearby tasks; compare their inputs and scope before substituting one for this operation.
References
Similar or alternative tools
- space in column name flagger
Spaces in column labels can affect downstream naming conventions.
- high cardinality column flagger
A column’s distinct-to-observed ratio measures how frequently values are unique.