./models directory of the project.
SQL file
Model can be defined in a SQL file. The file should have a.sql extension. The file should contain a SQL query
config directive
config directive should be in a comment block to be ignored by the SQL parser.
The model must define datasource, which is the connection string to the database. Also, the model have two optional
parameters name and id. Default values for these parameters is the file name without the extension.
YAML file
Model can also be defined in a YAML file. The file should have a.yaml or .ym; extension:
datasource and query. name and id are optional parameters.
Datasource
Postgres
To connect to a Postgres database, thedatasource should be a connection string: postgres://user:password@host:port/dbname