Skip to contents

The function stops with an error message if the file does not have the file extension ".zip" or if the zip file does not contain the expected csv files or if a csv file does not contain all expected fields (columns). Expected file names and field names are provided in config). If everything looks ok, the csv files in the zip file are extracted into a (new) folder.

Usage

import_db(zip_file, config, import_dir)

Arguments

zip_file

path to zip file containing csv files

config

configuration object (list) describing the csv files

import_dir

Path to folder into which to finally copy the extracted files.