Add Layer from Connection
add_layer_from_connectionLoad a database table or SQL query from a saved connection into the QGIS project as a new layer, using optional schema, geometry, and primary key settings.
Instructions
Load a table from a saved connection as a project layer. Pass table (+ schema), or sql to build a query layer executed by the database. For a SQL layer, geometry_column and primary_key may be needed for QGIS to map/identify the result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | No | ||
| name | No | ||
| table | No | ||
| schema | No | ||
| provider | Yes | ||
| connection | Yes | ||
| primary_key | No | ||
| geometry_column | No |