cdm_from_tables function

Create a cdm object from local tables