- Following the Corva Dev Center Backend Getting Started and Python SDK documentation:
- Create, develop, locally test and deploy a Python backend scheduled data time app:
- +App: Backend→ Scheduler → App Name: Lab Scheduled Data Time App → Segment: Drilling → Log Type: Time → Scheduler Type: Data Time → Follow: Corva Drilling Enhanced Real-Time → Category: Analytics
- Create a dataset:
- Dataset Type: Time-Based
- Name: {provider}#lab-scheduled-data-time-app
- In the manifest.json file, set “read”,”write” permissions for {provider}#lab-scheduled-data-time-app.
- In the manifest.json file, set the
“app.cron_string”: “/5 * * * *”
- Perform a GET request to
corva#wits
for the following value:“data.rop”
- Import the Python statistics library into the app:
import statistics
- Calculate the mean value of the 5 minutes of the "data.rop" data e.g.
mean_rop = statistics.mean(record.get("data", {}).get("rop", 0)
- POST the calculated
"data.mean_rop"
value to {provider}#lab-scheduled-data-time-app. - Test the GET and POST request in the Corva Data API Swagger document or in Postman utilizing your company's API key or your Bearer Token
- Locally test the lambda function using the Pytest template within the app directory
- Zip up the app and deploy to the Dev Center
- Utilizing the App Runner feature, test the app on Production
- Confirm no errors in Log Files and that the data is being populated in the {provider}#lab-scheduled-data-time-app dataset
- Create, develop, locally test and deploy a Python backend scheduled data time app: