public class DatasetUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DATASET |
static String |
DATASET_SPECIFIC_PROPS
A configuration key that allows a user to specify config parameters on a dataset specific level.
|
| Modifier and Type | Method and Description |
|---|---|
static Map<String,State> |
getDatasetSpecificProps(Iterable<String> datasets,
State state)
Given a
Iterable of dataset identifiers (e.g., name, URN, etc.), return a Map that links each
dataset with the extra configuration information specified in the state via DATASET_SPECIFIC_PROPS. |
public static final String DATASET
public static final String DATASET_SPECIFIC_PROPS
JsonObject and should contain a
JsonPrimitive that identifies the dataset. All configs in each dataset entry will
be added to the WorkUnits for that dataset.
An example value could be: "[{"dataset" : "myDataset1", "writer.partition.columns" : "header.memberId"}, {"dataset" : "myDataset2", "writer.partition.columns" : "auditHeader.time"}]".
The "dataset" field also allows regular expressions. For example, one can specify key, value
"dataset" : "myDataset.*". In this case all datasets whose name matches the pattern "myDataset.*" will have
all the specified config properties added to their WorkUnits. If more a dataset matches multiple
"dataset"s then the properties from all the JsonObjects will be added to their WorkUnits.
public static Map<String,State> getDatasetSpecificProps(Iterable<String> datasets, State state)
Iterable of dataset identifiers (e.g., name, URN, etc.), return a Map that links each
dataset with the extra configuration information specified in the state via DATASET_SPECIFIC_PROPS.