All Forums Database
Koentje 23 posts Joined 09/04
12 Nov 2009
SQL Parser

For Meta Data Management reasons we’re looking for a java sql parser.The goal is to find a JAVA class where you can pass your sequel.As result we want to know the tables used by the query. In a later phase the columns become also important.Who is already doing this?What is the software you’re using.Who had good results with java code he is using?Thanks for the information.: I don’t want to use the Teradata parser (eg. with explain). Some scripts are using volatile and temporary tables.

suhailmemon84 47 posts Joined 09/10
29 Jan 2013

We have a requirement where I need to find what percentage of queries are querying recent data vs the percentage of queries that are querying historical data.
I went on google to find any sqlparser or some UDF that I can use with terdaata to extract out the where clause of every query in a format of "name=value" pairs that I can further use to get data for my requirement.
I found one parser at but it doesn't seem to be working.
Do you know of any UDF/SQL parser that works with teradata?
Is anyone else doing this kind of anlaytics on sqltextinfo column of dbc.dbqlsqltbl?

29 Jan 2013

It would be easier to export the required columns from dbc.dbqlsqltbl into a file; and then use grep /awk in Unix to extract in the required format.


suhailmemon84 47 posts Joined 09/10
31 Jan 2013

It will be a very complex awk command. There are several types of complex queries and the where clause can be anywhere. Not sure if this is an ideal solution to achieve what I need.
Plus we certainly want to build further on these kinds of analytics and make it a generic utility.
Anyone else has done this before?

You must sign in to leave a comment.