ANTLR Official does not provide .g4 file for Vertica. If so, can you share and provide a github address?
If your g4 files format is similar to JSON try the Vertica FJSONPARSER parser which parses and loads JSON files. Those JSON files can contain either repeated JSON data objects including nested maps, or an outer list of JSON elements. See: https://www.vertica.com/docs/11.0.x/HTML/Content/Authoring/SQLReferenceManual/Statements/COPY/FJSONPARSER.htm
In addition you can use user-defined parser functions to parse data in formats not understood by the Vertica built-in parser. See: https://www.vertica.com/docs/11.0.x/HTML/Content/Authoring/ExtendingVertica/UDx/UDL/UDLParser.htm
@mosheg said: If your g4 files format is similar to JSON try the Vertica FJSONPARSER parser which parses and loads JSON files. Those JSON files can contain either repeated JSON data objects including nested maps, or an outer list of JSON elements. See: https://www.vertica.com/docs/11.0.x/HTML/Content/Authoring/SQLReferenceManual/Statements/COPY/FJSONPARSER.htm In addition you can use user-defined parser functions to parse data in formats not understood by the Vertica built-in parser. See: https://www.vertica.com/docs/11.0.x/HTML/Content/Authoring/ExtendingVertica/UDx/UDL/UDLParser.htm
@mosheg said: If your g4 files format is similar to JSON try the Vertica FJSONPARSER parser which parses and loads JSON files. Those JSON files can contain either repeated JSON data objects including nested maps, or an outer list of JSON elements. See: https://www.vertica.com/docs/11.0.x/HTML/Content/Authoring/SQLReferenceManual/Statements/COPY/FJSONPARSER.htm
Thank you very much for the advice, but I just need the Vertica SQL's g4 syntax file written by antlr4
Answers
If your g4 files format is similar to JSON try the Vertica FJSONPARSER parser which parses and loads JSON files.
Those JSON files can contain either repeated JSON data objects including nested maps, or an outer list of JSON elements.
See: https://www.vertica.com/docs/11.0.x/HTML/Content/Authoring/SQLReferenceManual/Statements/COPY/FJSONPARSER.htm
In addition you can use user-defined parser functions to parse data in formats not understood by the Vertica built-in parser.
See: https://www.vertica.com/docs/11.0.x/HTML/Content/Authoring/ExtendingVertica/UDx/UDL/UDLParser.htm
Thank you very much for the advice, but I just need the Vertica SQL's g4 syntax file written by antlr4