The Query Tool

The Query Tool provides a convenient way to execute SQL SELECT queries against a model in erwin Data Modeler (DM), a model in a mart, or against a database catalog. You can execute a query against the objects and properties in the model, the metadata defining those objects and properties, and the action log that records the changes that are made to your model during the modeling session.

You can create new queries or paste text from another source (such as a *.sql file) into a query.

You can save a query to a .*qry file for later execution. Query results can be saved to a *.csv (comma-separated values) file.

Although the Query Tool provides a built-in query interface in erwin DM, you can also use any third-party reporting tool that has ODBC capability to query erwin DM modeling data.

For more information on using ODBC data sources and sample queries, refer to the How to Generate or View Reports and Useful Queries topics respectively.

Note: Before using the Query Tool to connect to an ODBC data source, ensure that the Automated Metadata Harvesting (AMH) or erwin DM Scheduler services are not running. Any instance of these services that is running already is treated as the first instance of erwin Data Modeler (DM). When you run the Query Tool, it is treated as another instance of erwin DM. Hence, a connection to an ODBC data source is not allowed.

More information:

Create a Query

Execute a Query

Execute a Query Against a Database

Execute a Query Against erwin ODBC

Save a Result Set to a CSV File