Skip to content

Commit

Permalink
FEA: Add cloud function for extracting new measurement sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
cortadocodes committed Jun 13, 2023
1 parent b40196a commit 5780679
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions data_gateway_sessions/main.py
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()

0 comments on commit 5780679

Please sign in to comment.