-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEA: Add cloud function for extracting new measurement sessions
- Loading branch information
1 parent
b40196a
commit 5780679
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import logging | ||
|
||
from aerosense_tools.queries import BigQuery | ||
from octue.log_handlers import apply_log_handler | ||
|
||
|
||
apply_log_handler() | ||
logger = logging.getLogger(__name__) | ||
|
||
|
||
def extract_and_add_new_measurement_sessions(event, context): | ||
"""Extract new measurement sessions from the sensor data table and add them to the sessions table. | ||
:param dict event: Google Cloud event | ||
:param google.cloud.functions.Context context: metadata for the event | ||
:return None: | ||
""" | ||
BigQuery().extract_and_add_new_measurement_sessions() |