‎2021 Mar 04 5:14 PM
I'm trying to load data from a .csv, but keep getting an error:
Definition of the entity
entity QuestionLists : managed {
key questionListID : ty.QuestionListID;
hierarchyProfile : ty.hierarchyProfileID;
status : ty.Status;
title : ty.Title;
descr : ty.Descr;
note : ty.Note;
valuation : ty.ValuationStr;
questions : Association to many Questions;
}
types:
type QuestionID : Integer;
type QuestionListID : Integer;
type Status : String(4);
//
type Title : localized String(111);
type Descr : localized String(1111);
type Note : localized String(1111);
CSV File
questionListID ; hierarchyProfile ; status ; title ; descr ; note
1 ; 1 ; 1; QuestionList 1 ; Description of QL 1 ; n1
2 ; 1 ; 1; QuestionList 2 ; Description of QL 2 ; n2
3 ; 1 ; 1; QuestionList 4 ; Description of QL 3 ; n3
4 ; 1 ; 1; QuestionList 4 ; Description of QL 4 ; n4
Error:
[ERROR] SQLITE_MISMATCH: datatype mismatch
{ INSERT: { into: 'auditq.QuestionLists',
columns:
[ 'questionListID',
'hierarchyProfile',
'status',
'title',
'descr',
'note' ],
rows:
[ [ '1',
'1',
'1',
'QuestionList 1',
'Description of QL 1',
'n1',
'2021-03-04T17:01:05.200Z',
'anonymous',
'2021-03-04T17:01:05.200Z',
'anonymous' ],
[ '2',
'1',
'1',
'QuestionList 2',
'Description of QL 2',
'n2',
'2021-03-04T17:01:05.200Z',
'anonymous',
'2021-03-04T17:01:05.200Z',
'anonymous' ],
[ '3',
'1',
'1',
'QuestionList 4',
'Description of QL 3',
'n3',
'2021-03-04T17:01:05.200Z',
'anonymous',
'2021-03-04T17:01:05.200Z',
'anonymous' ],
[ '4',
'1',
'1',
'QuestionList 4',
'Description of QL 4',
'n4',
'2021-03-04T17:01:05.200Z',
'anonymous',
'2021-03-04T17:01:05.200Z',
'anonymous' ],
[ '',
'2021-03-04T17:01:05.200Z',
'anonymous',
'2021-03-04T17:01:05.200Z',
'anonymous' ] ] }}
at init_from_ (/home/michael/Developments/SAP/.../node_modules/@sap/cds/lib/db/deploy.js:182:35)
The columns for createAT/BY and modifiedAT/BY are apearently generated from the "managed" aspect, but should not be here on the database upload.