Extract tables used in morph-files

@dgudkov

Hi,

It is possible that I have posted this question but I couldn't find it.
In some cases when we have to refactor our database we want to find all morph files in which we import specific tables.
The metadata action does not return the query used in the "import from database" action.
We do not use visual query but insert our own select statements.

How can we reliably identify all morph files in which a table in a select statement is used ?

Currently my solution is to iterate over morph files and import the morph file as plain text in the submodule in EasyMorph in separate lines mode. Then I use a conditional filter in which I use contains() to match statements like "LEFT JOIN {TABLE} ", "FROM {TABLE}" , "RIGHT JOIN {TABLE} " AND "INNER JOIN {TABLE} "

Database connector names used by projects can be extracted with an action. But if you need to extract database table names, then the only way is to parse the XML content of EasyMorph projects - either as text files or as XML.

I use grepwin

Thanks

I will check it out :slight_smile: