Module import_csv

Import a csv file according to the derived file/record definitions.

Authors: Arjan Scherpenisse (arjan@scherpenisse.net), Marc Worrell (marc@worrell.nl).

Description

Import a csv file according to the derived file/record definitions.

Data Types

importresult()

importresult() = {file, file:filename_all()} | {date_start, calendar:datetime()} | {date_end, calendar:datetime()} | {seen, [{CategoryName::binary(), non_neg_integer()}]} | {new, [{CategoryName::binary(), non_neg_integer()}]} | {updated, [{CategoryName::binary(), non_neg_integer()}]} | {errors, list()} | {deleted, non_neg_integer()} | {ignored, list()}

importresults()

importresults() = [importresult()]

Function Index

import/3The import function, read the csv file and fetch all records.

Function Details

import/3

import(Filedef::#filedef{}, IsReset::boolean(), Context::z:context()) -> importresults()

The import function, read the csv file and fetch all records. This function is run as a spawned process. The Context should have the right permissions for inserting or updating the resources.


Generated by EDoc