Skip to content

Conversation

@tobymao
Copy link
Contributor

@tobymao tobymao commented Feb 17, 2023

No description provided.

@eakmanrq eakmanrq requested review from a team and removed request for SQLMesh February 18, 2023 00:15
ON employees.id = countries.employee_id
```

SQLMesh will detect that the model depends on both employees and countries. When evaluating this model, it will ensure that employees and countries will be evaluated first. External dependencies that are not defined in SQLMesh are also supported. SQLMesh can either depend on them via a schedule or through signals if you are using [Airflow](../../../integrations/airflow).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What did you mean here by depend on them via a schedule? Also we haven't really implemented the ability to depend on an external model via. signal in Airflow.

Additionally you don't have to worry about things like trailing commas as SQLGlot will remove them at parse time.

## Macros
Although SQL is very powerful, it is often required to run SQL queries with dynamic components like date filters. Additionally, large queries can be difficult to read and maintain, so having macros is powerful tool to address these advanced use cases.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although SQL is very powerful, it is often required to run SQL queries with dynamic components like date filters.. I think there is a missing sentence after this. You are referencing variables here but then don't explain what a variable is.

@eakmanrq eakmanrq added the Documentation Improvements or additions to documentation label Feb 18, 2023
tobymao and others added 2 commits February 17, 2023 18:27
Co-authored-by: Ryan Eakman <6326532+eakmanrq@users.noreply.github.com>
@tobymao tobymao enabled auto-merge (squash) February 18, 2023 02:34
@tobymao tobymao merged commit 5344afd into main Feb 18, 2023
@tobymao tobymao deleted the toby/sql_model branch February 18, 2023 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants