You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/concepts/models/python_models.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -369,6 +369,33 @@ def entrypoint(
369
369
)
370
370
```
371
371
372
+
Blueprint variables can also be used as **column names and column types** in the `columns` dictionary. For example, if each blueprint produces a model with a different set of column names and types, both can be parameterized using the same `@{variable}` syntax:
Global variables (defined in the project config) can also be used as column names and types in the same way.
398
+
372
399
Note the use of curly brace syntax `@{customer}` in the model name above. It is used to ensure SQLMesh can combine the macro variable into the model name identifier correctly - learn more [here](../../concepts/macros/sqlmesh_macros.md#embedding-variables-in-strings).
373
400
374
401
Blueprint variable mappings can also be constructed dynamically, e.g., by using a macro: `blueprints="@gen_blueprints()"`. This is useful in cases where the `blueprints` list needs to be sourced from external sources, such as CSV files.
Copy file name to clipboardExpand all lines: docs/integrations/dlt.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,12 +28,12 @@ This will create the configuration file and directories, which are found in all
28
28
29
29
SQLMesh will also automatically generate models to ingest data from the pipeline incrementally. Incremental loading is ideal for large datasets where recomputing entire tables is resource-intensive. In this case utilizing the [`INCREMENTAL_BY_TIME_RANGE` model kind](../concepts/models/model_kinds.md#incremental_by_time_range). However, these model definitions can be customized to meet your specific project needs.
30
30
31
-
#### Specify the path to the pipelines directory
31
+
#### Specify the path to the pipelines working directory
32
32
33
-
The default location for dlt pipelines is `~/.dlt/pipelines/<pipeline_name>`. If your pipelines are in a [different directory](https://dlthub.com/docs/general-usage/pipeline#separate-working-environments-with-pipelines_dir), use the `--dlt-path` argument to specify the path explicitly:
33
+
The default location for dlt pipeline working state is `~/.dlt/pipelines/<pipeline_name>`. If dlt stores your pipeline state in a [different pipelines working directory](https://dlthub.com/docs/general-usage/pipeline#separate-working-environments-with-pipelines_dir), use the `--dlt-path` argument to specify that directory explicitly. This should be the directory where dlt stores pipeline state, not the directory containing your pipeline scripts:
|`type`| Engine type name - must be `azuresql`| string | Y |
23
-
|`host`| The hostname of the Azure SQL server | string | Y |
24
-
|`user`| The username / client ID to use for authentication with the Azure SQL server | string | N |
25
-
|`password`| The password / client secret to use for authentication with the Azure SQL server | string | N |
26
-
|`port`| The port number of the Azure SQL server | int | N |
27
-
|`database`| The target database | string | N |
28
-
|`charset`| The character set used for the connection | string | N |
29
-
|`timeout`| The query timeout in seconds. Default: no timeout | int | N |
30
-
|`login_timeout`| The timeout for connection and login in seconds. Default: 60 | int | N |
31
-
|`appname`| The application name to use for the connection | string | N |
32
-
|`conn_properties`| The list of connection properties | list[string]| N |
33
-
|`autocommit`| Is autocommit mode enabled. Default: false | bool | N |
34
-
|`driver`| The driver to use for the connection. Default: pymssql | string | N |
35
-
|`driver_name`| The driver name to use for the connection. E.g., *ODBC Driver 18 for SQL Server*| string | N |
36
-
|`odbc_properties`| The dict of ODBC connection properties. E.g., authentication: ActiveDirectoryServicePrincipal. See more [here](https://learn.microsoft.com/en-us/sql/connect/odbc/dsn-connection-string-attribute?view=sql-server-ver16). | dict | N |
|`type`| Engine type name - must be `azuresql`| string | Y |
40
+
|`host`| The hostname of the Azure SQL server | string | Y |
41
+
|`user`| The username / client ID to use for authentication with the Azure SQL server | string | N |
42
+
|`password`| The password / client secret to use for authentication with the Azure SQL server | string | N |
43
+
|`port`| The port number of the Azure SQL server | int | N |
44
+
|`database`| The target database | string | N |
45
+
|`charset`| The character set used for the connection | string | N |
46
+
|`timeout`| The query timeout in seconds. Default: no timeout | int | N |
47
+
|`login_timeout`| The timeout for connection and login in seconds. Default: 60 | int | N |
48
+
|`login_attempts`| The number of reconnection attempts before failing. Default: 1 <br><br>*This option only applies to the `mssql-python` driver. | int | N |
49
+
|`appname`| The application name to use for the connection | string | N |
50
+
|`conn_properties`| The list of connection properties | list[string]| N |
51
+
|`autocommit`| Is autocommit mode enabled. Default: false | bool | N |
52
+
|`driver`| The driver to use for the connection. Default: pymssql | string | N |
53
+
|`driver_name`| The driver name to use for the connection (e.g., *ODBC Driver 18 for SQL Server*). | string | N |
54
+
|`odbc_properties`| The dict of ODBC connection properties (e.g., *authentication: ActiveDirectoryServicePrincipal*). See more [here](https://learn.microsoft.com/en-us/sql/connect/odbc/dsn-connection-string-attribute?view=sql-server-ver16).<br><br>*For the `mssql-python` driver, please see [this link](https://github.com/microsoft/mssql-python/wiki/Connection-to-SQL-Database). | dict | N |
0 commit comments