# Class MetadataParser

java.lang.Object
com.databricks.jdbc.api.impl.MetadataParser

public class MetadataParser extends Object
Utility class for parsing metadata descriptions into structured type mappings.

## Constructor Summary

Constructors
Constructor
Description
`MetadataParser()`

## Method Summary

Modifier and Type
Method
Description
`static String`
`parseArrayMetadata(String metadata)`
Parses ARRAY metadata to retrieve the element type.
`static String`
`parseMapMetadata(String metadata)`
Parses MAP metadata to retrieve key and value types.
`static Map<String,String>`
`parseStructMetadata(String metadata)`
Parses STRUCT metadata to extract field types.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MetadataParser

public MetadataParser()

## Method Details

### parseStructMetadata

public static Map<String,String> parseStructMetadata(String metadata)
Parses STRUCT metadata to extract field types.

Parameters:
  `metadata` - the metadata string representing a STRUCT type
Returns:
  a map where each key is a field name, and the value is the field's data type

### parseArrayMetadata

public static String parseArrayMetadata(String metadata)
Parses ARRAY metadata to retrieve the element type.

Parameters:
  `metadata` - the metadata string representing an ARRAY type
Returns:
  the element type contained within the array

### parseMapMetadata

public static String parseMapMetadata(String metadata)
Parses MAP metadata to retrieve key and value types.

Parameters:
  `metadata` - the metadata string representing a MAP type
Returns:
  a string formatted as "keyType, valueType"
Throws:
  `DatabricksDriverException` - if the MAP metadata format is invalid