Data can be loaded into a da_datastore by adding blocks of data from different sources.
A typical example is to load data from a file and add columns that were allocated dynamically in your program.
This can be achieved by calling da_data_load_from_csv() and da_data_load_col_int() consecutively, for example.
When calling any of the da_data_load_row_? or da_data_load_col_? functions on a da_datastore that is not empty, certain constraints must be
respected.
While adding columns, the number of rows in the block to be added must match the current number of rows present in the
da_datastore(da_data_get_num_rows()can be used to query the dimension).New rows can be added in several sub-blocks. However:
the
da_datastorewill be locked until the current number of columns in the store matches the number of columns of the new block;each sub-block has a minimum column size determined by the number of consecutive columns of the same type in the store. For example, if a given store already has two integer columns and a float column, new rows can be added in two sub-blocks (one with two integer columns and one with the remaining float column).
The final way to load data into a data store is from another da_datastore. Calling da_data_hconcat() will
horizontally concatenate two da_datastore objects with matching numbers of rows.