Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1007 miovision one updated alerts schema #1008

Merged
merged 10 commits into from
Jul 16, 2024
Prev Previous commit
#1007 mention airflow venv requirement
gabrielwol authored Jul 15, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 51aa565ec45f4633b5cdfc4ecc428bee367b9c05
2 changes: 1 addition & 1 deletion volumes/miovision/api/readme.md
Original file line number Diff line number Diff line change
@@ -143,7 +143,7 @@ The `--pull` and `--agg` commands allow us to run data pulling and aggregation t

### Alerts

Although it it typically run daily through the Airflow DAG [miovision_pull](../../../dags/miovision_pull.py) `pull_alerts` task, you can also pull from the Alerts API using the command line. This is helpful for backfilling multiple dates at once. An example command is:
Although it it typically run daily through the Airflow DAG [miovision_pull](../../../dags/miovision_pull.py) `pull_alerts` task, you can also pull from the Alerts API using the command line within the airflow venv (since Airflow Connections are used for database connection and API key). This is helpful for backfilling multiple dates at once. An example command is:
`python3 pull_alert.py run-alerts-api-cli --start_date=2024-06-01 --end_date=2024-07-01`
gabrielwol marked this conversation as resolved.
Show resolved Hide resolved

**Alerts Command Line Options**

Unchanged files with check annotations Beta

intersection_id text COLLATE pg_catalog."default" NOT NULL,
alert text COLLATE pg_catalog."default" NOT NULL,
start_time timestamp without time zone NOT NULL,
end_time timestamp without time zone,

Check notice on line 11 in volumes/miovision/sql/table/create-table-alerts.sql

GitHub Actions / SQLFluff Lint

SQLFluff

LT01: Expected only single space before 'timestamp' keyword. Found ' '.
intersection_uid integer,
CONSTRAINT miovision_alerts_pkey_new PRIMARY KEY (alert_id),
CONSTRAINT miov_alert_intersection_fkey_new FOREIGN KEY (intersection_uid)