Skip to content

Create New Dialect for SAS PROC SQL #2192

Closed Answered by georgesittas
LandonRGeorge asked this question in Q&A
Discussion options

You must be logged in to vote

Functions of the form name(arg1, ..., argn) are automatically handled by SQLGlot and they're either parsed into a "known" Func expression (i.e. AST node), for example exp.Avg, or into exp.Anonymous which is a "fallback" type for unknown functions.

Functions like PUT should thus be already handled for you (with the exception of best., which I'm not sure what it means and it's probably not handled at the moment). For functions like INPUT that have "special syntax", i.e. the CALCULATED part, you'll need to add an entry to FUNCTION_PARSERS to specify the specialized parsing logic. There are plenty of examples in the codebase, so you can use them as a guide.

You can also reach out in slack if …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by georgesittas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants