code: func RowToSchema(row bigtable.Row, def *schema.MetricDefinition) error {
  	if def == nil {
  		return fmt.Errorf("cant write row to nil MetricDefinition")
  	}
  	columns, ok := row[COLUMN_FAMILY]
  	if !ok {
  		return fmt.Errorf("no columns in columnFamly %s", COLUMN_FAMILY)
  	}
  	*def = schema.MetricDefinition{}
  	var err error
  	var val int64
  
  	def.Id, def.Partition, err = DecodeRowKey(row.Key())
  	if err != nil {
  		return err
  	}
  	for _, col := range columns {
  		switch strings.SplitN(col.Column, ":", 2)[1] {
  		case "OrgId":
  			val, err = binary.ReadVarint(bytes.NewReader(col.Value))
  			if err != nil {
  				return err
  			}
  			if val < 0 {
  				def.OrgId = idx.OrgIdPublic
  			} else {
  				def.OrgId = uint32(val)
  			}
  		case "Name":
  			def.Name = string(col.Value)
  		case "Interval":
  			val, err = binary.ReadVarint(bytes.NewReader(col.Value))
  			if err != nil {
  				return err
  			}
  			def.Interval = int(val)
  		case "Unit":
  			def.Unit = string(col.Value)
  		case "Mtype":
  			def.Mtype = string(col.Value)
  		case "Tags":
  			if len(col.Value) == 0 {
  				def.Tags = nil
  			} else {
  				def.Tags = strings.Split(string(col.Value), ";")
  			}
  		case "LastUpdate":
  			def.LastUpdate, err = binary.ReadVarint(bytes.NewReader(col.Value))
  			if err != nil {
  				return err
  			}
  		default:
  			return fmt.Errorf("unknown column: %s", col.Column)
  		}
  	}
  	return nil
  }
docs: // RowToSchema takes a row and unmarshals the data into the provided MetricDefinition.