Load to DB
Metadata
- Name: Load to DB
- Adaptor:
@openfn/language-postgresql
- Adaptor Version:
v3.3.3
- Created over 2 years ago
- Updated over 2 years ago
- Score: 0 (an indicator of how useful this job may be)
Key Functions
dataValue
, upsert
Expression
// Your job goes here.
upsert('patient', 'ON CONSTRAINT patient_pk', {
patient_id: dataValue('data.patient_name'),
patient_name: dataValue('data.patient_name'),
village_name: dataValue('data.village_name'),
last_menstrual_period: dataValue('data.last_menstrual_period'),
expected_delivery_date: dataValue('data.expected_delivery_date'),
children_alive: dataValue('data.children_alive'),
living_children: dataValue('data.living_children'),
feeling_sick: dataValue('data.feeling_sick'),
total_children: dataValue('data.Total_children'),
risk_level: dataValue('data.Risk_level')
});