cosmos to sqlite

maybe loop over the arrays and definitely add a check