Open godhao123 opened 2 months ago
me too
Preprocess the contents of the stored procedure before using SQLLineage to analyze the lineage.
Preprocess the contents of the stored procedure before using SQLLineage to analyze the lineage.
Could you please advise on how to effectively preprocess stored procedures, such as removing irrelevant syntax keywords and extracting complete, valid SQL? I am currently using regular expression matching to preprocess stored procedures, but this method cannot guarantee completeness and accuracy
My own approach is as follows:
Standardize the writing of stored procedures (limit certain writing methods, such as supporting three levels of nested judgment statements, etc.)
Use regular expressions to extract grammatically correct SQL, and then use sqllineage to parse the lineage
My own approach is as follows:
- Standardize the writing of stored procedures (limit certain writing methods, such as supporting three levels of nested judgment statements, etc.)
- Use regular expressions to extract grammatically correct SQL, and then use sqllineage to parse the lineage
Thank you very much for your response. I will strive to do better.
I use sqlparse to parse procedures.
Really love sqllineage! I have a question: I want to parse SQL statements from stored procedures. Is there a good method to extract valid SQL statements from stored procedures?