Small project to create functions to read and write/append Matlab tables to HDF5 files. I need a three Matlab functions to handle constructing/reading/appending :
writeTableToHDF5.m
readHDF5ToTable.m
appendTableToHDF5.m
1.
function writeTableToHDF5(fileName, dataTable, keyHeirarchy)
fileName - e.g '[login to view URL]'
dataTable - Matlab table with doubles and categoricals
keyHeirarchy - heirarchy of column names in hdf5 store e.g. {'key1', 'key2'}
The function writes the each column from each unique unique combination of keys to hdf5 structure \data\key1_val1\key2_val2\varName\
2.
function outputTable = readHDF5ToTable(fileName, {varName1, varName2,..., varNameN}, {value1,value2,...valueN })
Reads table from HDF5 such that
all( ([login to view URL] == value1) & ([login to view URL] == value2) & ... & ([login to view URL] == valueN));
3.
function appendTableToHDF5(fileName, dataTable, {'joinKey1, joinKey2, ..., joinKeyN})
e.g.
Appends data from dataTable to the hdf5 file and overwrites if there are any existing rows matching joinKey1, ..., joinKeyN
---
The datatypes will be either matlab categoricals or doubles and if it's much easier I can restrict to cases where the categoricals are unique so they can just be attributes on the hdf5.
More than happy if you can find an existing package to do this - will pay just the same. Also happy to consider an alternative methodology. The use case is that I want to be able to feed tables to this thing and it stores with a bit of a heirarchy and can extract reasonably quickly back to a table. My use case is that I get regular data updates in a standard format and need to append new values and quickly create matlab tables from some combinations of variables.
-----------------------------
Example:
% Example input table
dataTable1= table([1 2 3 4]', categorical(cellstr({'a' 'b' 'b' 'b'})'), [1, 1 2 2]', 'VariableNames', {'varName1', 'varName2', 'varName3'})
writeTableToHDF5('[login to view URL]', dataTable1, {'varName2', 'varName3'})
constructs [login to view URL]
\varName2\a\varName3\1\varName1= 1
\varName2\b\varName3\1\varName1 = 2
\varName2\a\varName3\2\varName1 = []
\varName2\b\varName3\2\varName1 = [3 4]'
% Example read file
outputTable = readHDF5ToTable([login to view URL], {'varName2', 'varName3'}, {'b', 2})
% Constructs the matlab table where varName2 == 'b' and varName3 == 2
% outputTable should have all elements equal to outputTable_match
outputTable_match= table([3 4]', categorical(cellstr({ 'b' 'b'})'), [2 2]', 'VariableNames', {'varName1', 'varName2', 'varName3'})
% Give a table with some new and some repeated values. Append if there is a match on target column values
dataTable2= table([1 2 3 4 5]', categorical(cellstr({'a' 'b' 'b' 'b' 'c'})'), [1, 1 2 2 2]', 'VariableNames', {'varName1', 'varName2', 'varName3'})
appendTableToHDF5('[login to view URL]', dataTable2, {varName1, varName2})
adds to the hdf5 table
\varName2\c\varName3\2\varName1 = 5
Dear,
I have read your project description. I have many experiences on Matlab for several years.
So I can make the 3 functions as following your requirement.
Relevant Skills and Experience
Matlab and Mathematica, database management, Big data
Proposed Milestones
€235 EUR - full