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

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

/**
 * @author wookvn
 *
 */
@Component
public class PlatomixDistinctTransform implements SeatunnelConnector<SeatunnelDistinctTransformConfig> {

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

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

}
