JSqlParser
JSqlParser copied to clipboard
JSQLParser not able to parse the informatica sql query.
Reference: http://www.clearpeaks.com/blog/etl/informatica-best-practice-user-defined-join-syntax-in-the-source-qualifier-transformation
If SQL Query has "{" as mentioned in the above link, JSQL Parser throwing exception.
Using {} instead of () is a very special use case. JSqlParser does only support ().
Thanks for reply, I changed to () and run but my query length is more than 10000 characters. It is showing as ... like LANGUAGE_CODE = '$$LAN... . Please suggest.
Sorry, but I dont understand what you mean. Give me a concrete example and the output and expected behaviour.
Hello, just to know is there any limitation on query length? like max character limit 10000. i am getting the exception like below:
net.sf.jsqlparser.JSQLParserException at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:51) at com.jade.infa.util.SQLUtils.isScalarQuery(SQLUtils.java:414) at com.jade.infa.util.SQLUtils.main(SQLUtils.java:2761) Caused by: net.sf.jsqlparser.parser.ParseException: Encountered " <S_IDENTIFIER> "W_PROJ_COST_LINE_FS "" at line 1, column 4116. Was expecting one of: "(" ... "(" ... "(" ... "(" ... "(" ...
The heap is the limit. So I guess there are syntactical constructs JSqlParser does not know.
The below query can not parse since joining condition are in Where clause. And it is showing the above error.
Select columnname1, columnaname2 from W_GL_ACCOUNT_D GL_ACCT_D_CR WHERE { W_PROJ_COST_LINE_FS INNER JOIN W_PROJECT_D ON W_PROJ_COST_LINE_FS.PROJECT_ID = W_PROJECT_D.INTEGRATION_ID AND W_PROJ_COST_LINE_FS.DATASOURCE_NUM_ID = W_PROJECT_D.DATASOURCE_NUM_ID LEFT OUTER JOIN PA_CAL ON W_PROJECT_D.PROJ_OPERATING_UNIT_ID = PA_CAL.ORG_ID } $$HINT2"