Package com.databricks.jdbc.api.impl
Class ComplexDataTypeParser
- java.lang.Object
-
- com.databricks.jdbc.api.impl.ComplexDataTypeParser
-
public class ComplexDataTypeParser extends Object
-
-
Constructor Summary
Constructors Constructor Description ComplexDataTypeParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringformatComplexTypeString(String jsonString, String complexType, String typeMetadata)Formats a complex type JSON string into a consistent string format.StringformatMapString(String jsonString, String mapMetadata)Formats a map JSON string into the standard {key:value} format.DatabricksArrayparseJsonStringToDbArray(String json, String arrayMetadata)DatabricksMap<String,Object>parseJsonStringToDbMap(String json, String mapMetadata)DatabricksStructparseJsonStringToDbStruct(String json, String structMetadata)DatabricksArrayparseToArray(com.fasterxml.jackson.databind.JsonNode node, String arrayMetadata)DatabricksMap<String,Object>parseToMap(com.fasterxml.jackson.databind.JsonNode node, String mapMetadata)DatabricksStructparseToStruct(com.fasterxml.jackson.databind.JsonNode node, String structMetadata)
-
-
-
Method Detail
-
parseJsonStringToDbArray
public DatabricksArray parseJsonStringToDbArray(String json, String arrayMetadata) throws DatabricksParsingException
- Throws:
DatabricksParsingException
-
parseJsonStringToDbMap
public DatabricksMap<String,Object> parseJsonStringToDbMap(String json, String mapMetadata) throws DatabricksParsingException
- Throws:
DatabricksParsingException
-
parseJsonStringToDbStruct
public DatabricksStruct parseJsonStringToDbStruct(String json, String structMetadata) throws DatabricksParsingException
- Throws:
DatabricksParsingException
-
parseToArray
public DatabricksArray parseToArray(com.fasterxml.jackson.databind.JsonNode node, String arrayMetadata) throws DatabricksParsingException
- Throws:
DatabricksParsingException
-
parseToMap
public DatabricksMap<String,Object> parseToMap(com.fasterxml.jackson.databind.JsonNode node, String mapMetadata) throws DatabricksParsingException
- Throws:
DatabricksParsingException
-
parseToStruct
public DatabricksStruct parseToStruct(com.fasterxml.jackson.databind.JsonNode node, String structMetadata) throws DatabricksParsingException
- Throws:
DatabricksParsingException
-
formatComplexTypeString
public String formatComplexTypeString(String jsonString, String complexType, String typeMetadata)
Formats a complex type JSON string into a consistent string format. This is primarily used when complex datatype support is disabled.- Parameters:
jsonString- The JSON string representation of the complex typecomplexType- The type of complex data (MAP, ARRAY, STRUCT)typeMetadata- The metadata for the type (e.g., "MAP") - Returns:
- A consistently formatted string representation
-
formatMapString
public String formatMapString(String jsonString, String mapMetadata)
Formats a map JSON string into the standard {key:value} format.- Parameters:
jsonString- The JSON string representation of the mapmapMetadata- The metadata for the map type (e.g., "MAP") - Returns:
- A map string in the format {key:value,key:value}
-
-