store_observation: store a datafield in the database

Description Usage Arguments

Description

store a datafield in the database

Usage

1
2
store_observation(datafield, observation, location, parameter, conn, hash,
  clean = TRUE)

Arguments

datafield

a data.frame with datafield metadata. Must contain the variables local_id, datasource, table_name, primary_key and datafield_type. Other variables are ignored.

observation

a data.frame with observation metadata. Must contain the variables local_id, datafield_local_id, external_code, location_local_id, year and parameter_local_id. Other variables are ignored. datafield_local_id, external_code and parameter_local_id can be missing.

location

a data.frame with location metadata. Must contain the following columns: local_id, description, parent_local_id, datafield_local_id and external_code. Other columns are ignored.

parameter

a data.frame with parameters. Must contains the variables "description", "local_id", and "parent_parameter_local_id". Other variables are ignored.

conn

a DBIconnection

hash

the hash of the update session

clean

perform all database operations within a transaction and clean up the staging tables. Defaults to TRUE.


inbo/n2kupdate documentation built on May 8, 2019, 5:42 p.m.