use of com.datastax.oss.dsbulk.codecs.text.TextConversionContext in project dsbulk by datastax.
the class JsonNodeToListCodecTest method setUp.
@BeforeEach
void setUp() {
ConversionContext context = new TextConversionContext().setNullStrings("NULL");
ConvertingCodecFactory codecFactory = new ConvertingCodecFactory(context);
codec1 = (JsonNodeToListCodec<Double>) codecFactory.<JsonNode, List<Double>>createConvertingCodec(DataTypes.listOf(DataTypes.DOUBLE), JSON_NODE_TYPE, true);
codec2 = (JsonNodeToListCodec<String>) codecFactory.<JsonNode, List<String>>createConvertingCodec(DataTypes.listOf(DataTypes.TEXT), JSON_NODE_TYPE, true);
}
use of com.datastax.oss.dsbulk.codecs.text.TextConversionContext in project dsbulk by datastax.
the class JsonNodeToBigDecimalCodecTest method setUp.
@BeforeEach
void setUp() {
ConversionContext context = new TextConversionContext().setNullStrings("NULL").setFormatNumbers(true);
ConvertingCodecFactory codecFactory = new ConvertingCodecFactory(context);
codec = (JsonNodeToBigDecimalCodec) codecFactory.<JsonNode, BigDecimal>createConvertingCodec(DataTypes.DECIMAL, JSON_NODE_TYPE, true);
}
use of com.datastax.oss.dsbulk.codecs.text.TextConversionContext in project dsbulk by datastax.
the class JsonNodeToBigIntegerCodecTest method setUp.
@BeforeEach
void setUp() {
ConversionContext context = new TextConversionContext().setNullStrings("NULL").setFormatNumbers(true);
ConvertingCodecFactory codecFactory = new ConvertingCodecFactory(context);
codec = (JsonNodeToBigIntegerCodec) codecFactory.<JsonNode, BigInteger>createConvertingCodec(DataTypes.VARINT, JSON_NODE_TYPE, true);
}
use of com.datastax.oss.dsbulk.codecs.text.TextConversionContext in project dsbulk by datastax.
the class JsonNodeToLongCodecTest method setUp.
@BeforeEach
void setUp() {
ConversionContext context = new TextConversionContext().setNullStrings("NULL").setFormatNumbers(true);
ConvertingCodecFactory codecFactory = new ConvertingCodecFactory(context);
codec = (JsonNodeToLongCodec) codecFactory.<JsonNode, Long>createConvertingCodec(DataTypes.BIGINT, JSON_NODE_TYPE, true);
}
use of com.datastax.oss.dsbulk.codecs.text.TextConversionContext in project dsbulk by datastax.
the class StringToIntegerCodecTest method setUpCodec2.
@BeforeEach
void setUpCodec2() {
ConversionContext context = new TextConversionContext().setNullStrings("NULL", "NADA").setFormatNumbers(true);
ConvertingCodecFactory codecFactory = new ConvertingCodecFactory(context);
codec2 = (StringToIntegerCodec) codecFactory.<String, Integer>createConvertingCodec(DataTypes.INT, GenericType.STRING, true);
}
Aggregations