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
It outputs the full SQL code in the default or target dialect.
@@ -857,14 +856,15 @@ Each time you perform a SQLMesh command, it creates a log file in the `logs` dir
857
856
858
857
```bash
859
858
# install this open source tool that enhances the default `cat` command
859
+
# https://github.com/sharkdp/bat
860
860
brew install bat
861
861
```
862
862
863
863
```bash
864
864
bat --theme='ansi'$(ls -t logs/ | head -n 1 | sed 's/^/logs\//')
865
865
```
866
866
867
-
- In simple terms this command works like this: "Show me the contents of the newest log file in the logs directory, with nice formatting and syntax highlighting.”
867
+
- In simple terms this command works like this: "Show me the contents of the newest log file in the `logs/` directory, with nice formatting and syntax highlighting.”
868
868
- press `q` to quit out of big files in the terminal
869
869
870
870
??? "Example Output"
@@ -899,7 +899,15 @@ bat --theme='ansi' $(ls -t logs/ | head -n 1 | sed 's/^/logs\//')
899
899
│ L: SELECT CURRENT_CATALOG() (base.py:2128)
900
900
```
901
901
902
-
## **Run Commands**
902
+
## **Run on Production Schedule**
903
+
904
+
If you're using open source SQLMesh, you can run this in your orchestrator (ex: Dagster, GitHub Actions, etc.) every 5 minutes or at your lowest model cron schedule (ex: every 1 hour). Don't worry! It will only run executions that need to be run.
905
+
906
+
If you're using Tobiko Cloud, this configures automatically without additional configuration.
907
+
908
+
### Run Models
909
+
910
+
This command is intended be run on a schedule. It will skip the physical and virtual layer updates and simply execute the model batches.
903
911
904
912
=== "SQLMesh"
905
913
@@ -913,21 +921,49 @@ bat --theme='ansi' $(ls -t logs/ | head -n 1 | sed 's/^/logs\//')
913
921
tcloud sqlmesh run
914
922
```
915
923
916
-
asdf
924
+
??? "Example Output"
917
925
918
-
=== "SQLMesh"
926
+
This is what it looks like if models are ready to run.
You'll these commands ad hoc to verify your changes are behaving as expected.
958
-
1002
+
### **Miscellaneous**
959
1003
960
-
961
-
962
-
## **Miscellaneous**
1004
+
If you notice you have a lot of old development schemas/data, you can clean them up with the following command. This process runs automatically during the `sqlmesh run` command. This defaults to deleting old data past 7 days.
963
1005
964
1006
=== "SQLMesh"
965
1007
@@ -971,22 +1013,4 @@ You'll these commands ad hoc to verify your changes are behaving as expected.
971
1013
972
1014
```bash
973
1015
tcloud sqlmesh janitor
974
-
```
975
-
976
-
Fun for the whole family:
977
-
978
-
```bash
979
-
brew install bat
980
-
```
981
-
982
-
```bash
983
-
bat --theme='ansi'$(ls -t logs/ | head -n 1 | sed 's/^/logs\//')
984
-
```
985
-
986
-
- view logs
987
-
- a special treat for you ;)
988
-
-https://github.com/sharkdp/bat
989
-
- In simple terms: "Show me the contents of the newest log file in the logs directory, with nice formatting and syntax highlighting.”
990
-
-`q` to quit out of big files in the terminal
991
-
992
-
- Manually clean up old development schemas outside the automated schedule
0 commit comments