Extracts data from database tables or views and creates corresponding csv files