/**
 * 
 */
package org.springblade.etl.connector.transform;

import org.springblade.etl.connector.base.SeatunnelConnector;
import org.springblade.etl.connector.transform.config.SeatunnelColumnMergeTransformConfig;
import org.springblade.etl.util.EtlJsonUtil;
import org.springblade.etl.util.ValidateUtil;
import org.springframework.stereotype.Component;


/**
 * @author wookvn
 *
 */
@Component
public class PlatomixColumnMergeTransform implements SeatunnelConnector<SeatunnelColumnMergeTransformConfig> {

	@Override
	public SeatunnelColumnMergeTransformConfig buildConfig(String configJson) {
		return (SeatunnelColumnMergeTransformConfig)validate(configJson);
	}

	@Override
	public Object validate(String configJson) {
		SeatunnelColumnMergeTransformConfig seatunnelConfig = EtlJsonUtil.parseJsonString(configJson, SeatunnelColumnMergeTransformConfig.class);
		ValidateUtil.validate(seatunnelConfig);
		return seatunnelConfig;
	}

}
