@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class OpenXJsonSerDe extends Object implements Serializable, Cloneable, StructuredPojo
The OpenX SerDe. Used by Kinesis Data Firehose for deserializing data, which means converting it from the JSON format in preparation for serializing it to the Parquet or ORC format. This is one of two deserializers you can choose, depending on which one offers the functionality you need. The other option is the native Hive / HCatalog JsonSerDe.
Constructor and Description |
---|
OpenXJsonSerDe() |
Modifier and Type | Method and Description |
---|---|
OpenXJsonSerDe |
addColumnToJsonKeyMappingsEntry(String key,
String value)
Add a single ColumnToJsonKeyMappings entry
|
OpenXJsonSerDe |
clearColumnToJsonKeyMappingsEntries()
Removes all the entries added into ColumnToJsonKeyMappings.
|
OpenXJsonSerDe |
clone() |
boolean |
equals(Object obj) |
Boolean |
getCaseInsensitive()
When set to
true , which is the default, Kinesis Data Firehose converts JSON keys to lowercase before
deserializing them. |
Map<String,String> |
getColumnToJsonKeyMappings()
Maps column names to JSON keys that aren't identical to the column names.
|
Boolean |
getConvertDotsInJsonKeysToUnderscores()
When set to
true , specifies that the names of the keys include dots and that you want Kinesis Data
Firehose to replace them with underscores. |
int |
hashCode() |
Boolean |
isCaseInsensitive()
When set to
true , which is the default, Kinesis Data Firehose converts JSON keys to lowercase before
deserializing them. |
Boolean |
isConvertDotsInJsonKeysToUnderscores()
When set to
true , specifies that the names of the keys include dots and that you want Kinesis Data
Firehose to replace them with underscores. |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setCaseInsensitive(Boolean caseInsensitive)
When set to
true , which is the default, Kinesis Data Firehose converts JSON keys to lowercase before
deserializing them. |
void |
setColumnToJsonKeyMappings(Map<String,String> columnToJsonKeyMappings)
Maps column names to JSON keys that aren't identical to the column names.
|
void |
setConvertDotsInJsonKeysToUnderscores(Boolean convertDotsInJsonKeysToUnderscores)
When set to
true , specifies that the names of the keys include dots and that you want Kinesis Data
Firehose to replace them with underscores. |
String |
toString()
Returns a string representation of this object.
|
OpenXJsonSerDe |
withCaseInsensitive(Boolean caseInsensitive)
When set to
true , which is the default, Kinesis Data Firehose converts JSON keys to lowercase before
deserializing them. |
OpenXJsonSerDe |
withColumnToJsonKeyMappings(Map<String,String> columnToJsonKeyMappings)
Maps column names to JSON keys that aren't identical to the column names.
|
OpenXJsonSerDe |
withConvertDotsInJsonKeysToUnderscores(Boolean convertDotsInJsonKeysToUnderscores)
When set to
true , specifies that the names of the keys include dots and that you want Kinesis Data
Firehose to replace them with underscores. |
public void setConvertDotsInJsonKeysToUnderscores(Boolean convertDotsInJsonKeysToUnderscores)
When set to true
, specifies that the names of the keys include dots and that you want Kinesis Data
Firehose to replace them with underscores. This is useful because Apache Hive does not allow dots in column
names. For example, if the JSON contains a key whose name is "a.b", you can define the column name to be "a_b"
when using this option.
The default is false
.
convertDotsInJsonKeysToUnderscores
- When set to true
, specifies that the names of the keys include dots and that you want Kinesis
Data Firehose to replace them with underscores. This is useful because Apache Hive does not allow dots in
column names. For example, if the JSON contains a key whose name is "a.b", you can define the column name
to be "a_b" when using this option.
The default is false
.
public Boolean getConvertDotsInJsonKeysToUnderscores()
When set to true
, specifies that the names of the keys include dots and that you want Kinesis Data
Firehose to replace them with underscores. This is useful because Apache Hive does not allow dots in column
names. For example, if the JSON contains a key whose name is "a.b", you can define the column name to be "a_b"
when using this option.
The default is false
.
true
, specifies that the names of the keys include dots and that you want
Kinesis Data Firehose to replace them with underscores. This is useful because Apache Hive does not allow
dots in column names. For example, if the JSON contains a key whose name is "a.b", you can define the
column name to be "a_b" when using this option.
The default is false
.
public OpenXJsonSerDe withConvertDotsInJsonKeysToUnderscores(Boolean convertDotsInJsonKeysToUnderscores)
When set to true
, specifies that the names of the keys include dots and that you want Kinesis Data
Firehose to replace them with underscores. This is useful because Apache Hive does not allow dots in column
names. For example, if the JSON contains a key whose name is "a.b", you can define the column name to be "a_b"
when using this option.
The default is false
.
convertDotsInJsonKeysToUnderscores
- When set to true
, specifies that the names of the keys include dots and that you want Kinesis
Data Firehose to replace them with underscores. This is useful because Apache Hive does not allow dots in
column names. For example, if the JSON contains a key whose name is "a.b", you can define the column name
to be "a_b" when using this option.
The default is false
.
public Boolean isConvertDotsInJsonKeysToUnderscores()
When set to true
, specifies that the names of the keys include dots and that you want Kinesis Data
Firehose to replace them with underscores. This is useful because Apache Hive does not allow dots in column
names. For example, if the JSON contains a key whose name is "a.b", you can define the column name to be "a_b"
when using this option.
The default is false
.
true
, specifies that the names of the keys include dots and that you want
Kinesis Data Firehose to replace them with underscores. This is useful because Apache Hive does not allow
dots in column names. For example, if the JSON contains a key whose name is "a.b", you can define the
column name to be "a_b" when using this option.
The default is false
.
public void setCaseInsensitive(Boolean caseInsensitive)
When set to true
, which is the default, Kinesis Data Firehose converts JSON keys to lowercase before
deserializing them.
caseInsensitive
- When set to true
, which is the default, Kinesis Data Firehose converts JSON keys to lowercase
before deserializing them.public Boolean getCaseInsensitive()
When set to true
, which is the default, Kinesis Data Firehose converts JSON keys to lowercase before
deserializing them.
true
, which is the default, Kinesis Data Firehose converts JSON keys to
lowercase before deserializing them.public OpenXJsonSerDe withCaseInsensitive(Boolean caseInsensitive)
When set to true
, which is the default, Kinesis Data Firehose converts JSON keys to lowercase before
deserializing them.
caseInsensitive
- When set to true
, which is the default, Kinesis Data Firehose converts JSON keys to lowercase
before deserializing them.public Boolean isCaseInsensitive()
When set to true
, which is the default, Kinesis Data Firehose converts JSON keys to lowercase before
deserializing them.
true
, which is the default, Kinesis Data Firehose converts JSON keys to
lowercase before deserializing them.public Map<String,String> getColumnToJsonKeyMappings()
Maps column names to JSON keys that aren't identical to the column names. This is useful when the JSON contains
keys that are Hive keywords. For example, timestamp
is a Hive keyword. If you have a JSON key named
timestamp
, set this parameter to {"ts": "timestamp"}
to map this key to a column named
ts
.
timestamp
is a Hive keyword. If you have
a JSON key named timestamp
, set this parameter to {"ts": "timestamp"}
to map
this key to a column named ts
.public void setColumnToJsonKeyMappings(Map<String,String> columnToJsonKeyMappings)
Maps column names to JSON keys that aren't identical to the column names. This is useful when the JSON contains
keys that are Hive keywords. For example, timestamp
is a Hive keyword. If you have a JSON key named
timestamp
, set this parameter to {"ts": "timestamp"}
to map this key to a column named
ts
.
columnToJsonKeyMappings
- Maps column names to JSON keys that aren't identical to the column names. This is useful when the JSON
contains keys that are Hive keywords. For example, timestamp
is a Hive keyword. If you have a
JSON key named timestamp
, set this parameter to {"ts": "timestamp"}
to map this
key to a column named ts
.public OpenXJsonSerDe withColumnToJsonKeyMappings(Map<String,String> columnToJsonKeyMappings)
Maps column names to JSON keys that aren't identical to the column names. This is useful when the JSON contains
keys that are Hive keywords. For example, timestamp
is a Hive keyword. If you have a JSON key named
timestamp
, set this parameter to {"ts": "timestamp"}
to map this key to a column named
ts
.
columnToJsonKeyMappings
- Maps column names to JSON keys that aren't identical to the column names. This is useful when the JSON
contains keys that are Hive keywords. For example, timestamp
is a Hive keyword. If you have a
JSON key named timestamp
, set this parameter to {"ts": "timestamp"}
to map this
key to a column named ts
.public OpenXJsonSerDe addColumnToJsonKeyMappingsEntry(String key, String value)
public OpenXJsonSerDe clearColumnToJsonKeyMappingsEntries()
public String toString()
toString
in class Object
Object.toString()
public OpenXJsonSerDe clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.