DataGrip
 
Get DataGrip

DDL data sources

Last modified: 22 November 2024

DDL data source is a virtual view of a database structure based on SQL files that contain data definition language statements (DDL statements). You can reference all tables, columns and other objects defined in such files in the editor. Diagrams are also supported.

DDL data source lets you maintain database versioning. Keep the SQL files under a VCS system and regenerate them every time your database structure is updated.

Once created, DDL data sources are available in Database Explorer (View | Tool Windows | Database Explorer) . You can create and manage the SQL files with statements in the Files tool window (View | Tool Windows | Files) .

DDL data source in Database Explorer and SQL files with statements in Files tool window

Check the following video that shows how to work with DDL data sources.

In DataGrip, you can create a DDL data source by dumping an existing data source and by using existing SQL files:

Use file scopes to filter the files and folders that are used as sources for the DDL data source. When you dump DLL files to the existing DDL data source, the excluded ones will be ignored.