read
public javax.ws.rs.core.Response read(@Context
javax.servlet.ServletContext servletContext,
@Context
javax.ws.rs.core.HttpHeaders headers,
java.lang.String profile,
java.lang.String pattern)
throws java.lang.Exception
This function queries the underlying store based on the given profile to get schema for items that match the given pattern
metadata: Item name, field names, field types. The types are converted
from the underlying types to HAWQ types.
Unsupported types result in an error.
Response Examples:
For a table default.t1
with 2 fields (a int, b float) will
be returned as:
{"PXFMetadata":[{"item":{"path":"default","name":"t1"},"fields":[{"name":"a","type":"int"},{"name":"b","type":"float"}]}]}
- Parameters:
servletContext
- servlet context
headers
- http headers
profile
- based on this the metadata source can be inferred
pattern
- table/file name or pattern in the given source
- Returns:
- JSON formatted response with metadata of each item that corresponds to the pattern
- Throws:
java.lang.Exception
- if connection to the source/catalog failed, item didn't exist for the pattern
its type or fields are not supported