public interface LoaderJSONStep<R extends Record>
The
Loader
API is used for configuring data loads.
The step in constructing the Loader
object where you can set
the mandatory JSON loader options.
- Author:
- Lukas Eder, Johannes Bühler
-
Method Summary
Modifier and TypeMethodDescription@NotNull LoaderJSONOptionsStep<R>
fields(Collection<? extends Field<?>> fields)
Specify the fields to be loaded into the table in the correct order.@NotNull LoaderJSONOptionsStep<R>
Specify the fields to be loaded into the table in the correct order.@NotNull LoaderJSONOptionsStep<R>
fields(LoaderFieldMapper mapper)
Specify a function to apply on each input field to receive the target table's field.@NotNull LoaderCSVOptionsStep<R>
Indicate that all input fields which have a corresponding field in the target table (with the same name) should be loaded.@NotNull LoaderCSVOptionsStep<R>
Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
fields
Specify the fields to be loaded into the table in the correct order.The JSON column at index
i
is inserted into the table field at indexi
. Iffields[i] == null
orfields.length <= i
, then the JSON column is skipped. -
fields
@NotNull @CheckReturnValue @Support @NotNull LoaderJSONOptionsStep<R> fields(Collection<? extends Field<?>> fields)Specify the fields to be loaded into the table in the correct order.The JSON column at index
i
is inserted into the table field at indexi
. Ifnew ArrayList(fields).get(i) == null
ornew ArrayList(fields).size() <= i
, then the JSON column is skipped. -
fields
@NotNull @CheckReturnValue @Support @NotNull LoaderJSONOptionsStep<R> fields(LoaderFieldMapper mapper)Specify a function to apply on each input field to receive the target table's field.The input field obtained from
LoaderFieldMapper.LoaderFieldContext.field()
wraps the JSON column name if any, or an unspecified field enumeration is used. TheLoaderFieldMapper.LoaderFieldContext.index()
property corresponds to the JSON column index in enumeration order. -
fieldsFromSource
@Deprecated(forRemoval=true, since="3.14") @NotNull @CheckReturnValue @Support @NotNull LoaderCSVOptionsStep<R> fieldsFromSource()Deprecated, for removal: This API element is subject to removal in a future version.- 3.14.0 - [#10010] - UsefieldsCorresponding()
instead.Indicate that all input fields which have a corresponding field in the target table (with the same name) should be loaded.- Throws:
LoaderConfigurationException
- When the source data does not expose field names.
-
fieldsCorresponding
Indicate that all input fields which have a corresponding field in the target table (with the same name) should be loaded.- Throws:
LoaderConfigurationException
- When the source data does not expose field names.
-
fieldsCorresponding()
instead.