add sql conversion
unify config and metadata representations
add some data validation
extend tests
Contents: