Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
hi
how to create the datashape and its fields by giving the fields and its basetype in runtime based upon the data from csv file.
thanks
Hi @achitters have you already seen the CreateDataShape service available in the Resource EntityService, you'll have to map the column headers from csv to the fields that can be passed to the fields in this CreateDataShape()
the datashape is already created in runtime and unable to set the primary key and basetype of the field in runtime.
I believe that should be doable with the UpdateFieldDefinition() , eg.
DataShapes["DemoDS"].UpdateFieldDefinition({ name: "Field1" /* STRING */, description: undefined /* STRING */, type: INTEGER/* BASETYPENAME */, ordinal: undefined /* INTEGER */, primaryKey: true/* BOOLEAN */, dataShape: undefined /* DATASHAPENAME */ });