| Package | Description |
|---|---|
| co.cask.cdap.api.data.format |
Defines data formats for use in programs and data exploration.
|
| co.cask.cdap.api.data.schema |
This package contains beta classes for schema in CDAP.
|
| co.cask.cdap.internal.io |
| Modifier and Type | Field and Description |
|---|---|
protected Schema |
RecordFormat.schema |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Schema |
RecordFormat.getDefaultSchema()
Get the default schema for the format.
|
Schema |
RecordFormat.getSchema()
Get the schema of the format.
|
Schema |
StructuredRecord.getSchema()
Get the schema of the record.
|
Schema |
FormatSpecification.getSchema() |
| Modifier and Type | Method and Description |
|---|---|
static StructuredRecord.Builder |
StructuredRecord.builder(Schema schema)
Get a builder for creating a record with the given schema.
|
protected abstract void |
RecordFormat.validateSchema(Schema schema)
Validate the given schema, throwing an exception if it is unsupported.
|
| Constructor and Description |
|---|
FormatSpecification(String name,
Schema schema) |
FormatSpecification(String name,
Schema schema,
Map<String,String> settings) |
| Modifier and Type | Method and Description |
|---|---|
static Schema |
Schema.arrayOf(Schema componentSchema)
|
static Schema |
Schema.enumWith(Class<Enum<?>> enumClass)
|
static Schema |
Schema.enumWith(Iterable<String> values)
|
static Schema |
Schema.enumWith(String... values)
|
Schema |
Schema.getComponentSchema() |
Schema |
Schema.getNonNullable()
Assuming this is a union of a null and one non-null type, return the non-null schema.
|
Schema |
Schema.Field.getSchema() |
Schema |
Schema.getUnionSchema(int idx) |
static Schema |
Schema.mapOf(Schema keySchema,
Schema valueSchema)
|
static Schema |
Schema.nullableOf(Schema schema)
Creates a nullable
Schema for the given schema, which is a union of the given schema with the null type. |
static Schema |
Schema.of(Schema.Type type)
Creates a
Schema for the given type. |
static Schema |
Schema.parseJson(Reader reader)
Parse the given json representation of a schema object contained in a reader into a schema object.
|
static Schema |
Schema.parseJson(String schemaJson)
Parse the given JSON representation, as returned by
toString() into a Schema object. |
static Schema |
Schema.parseSQL(String schemaString)
Parse the given sql-like schema representation into a schema object.
|
static Schema |
Schema.recordOf(String name)
|
static Schema |
Schema.recordOf(String name,
Iterable<Schema.Field> fields)
|
static Schema |
Schema.recordOf(String name,
Schema.Field... fields)
|
static Schema |
Schema.unionOf(Iterable<Schema> schemas)
|
static Schema |
Schema.unionOf(Schema... schemas)
|
| Modifier and Type | Method and Description |
|---|---|
Map.Entry<Schema,Schema> |
Schema.getMapSchema() |
Map.Entry<Schema,Schema> |
Schema.getMapSchema() |
List<Schema> |
Schema.getUnionSchemas() |
| Modifier and Type | Method and Description |
|---|---|
static Schema |
Schema.arrayOf(Schema componentSchema)
|
boolean |
Schema.isCompatible(Schema target)
Checks if the given target schema is compatible with this schema, meaning datum being written with this
schema could be projected correctly into the given target schema.
|
static Schema |
Schema.mapOf(Schema keySchema,
Schema valueSchema)
|
static Schema |
Schema.nullableOf(Schema schema)
Creates a nullable
Schema for the given schema, which is a union of the given schema with the null type. |
static Schema.Field |
Schema.Field.of(String name,
Schema schema)
Creates a
Schema.Field instance with the given name and Schema. |
static Schema |
Schema.unionOf(Schema... schemas)
|
| Modifier and Type | Method and Description |
|---|---|
static Schema |
Schema.unionOf(Iterable<Schema> schemas)
|
| Constructor and Description |
|---|
SchemaHash(Schema schema) |
| Modifier and Type | Method and Description |
|---|---|
Schema |
SQLSchemaParser.parse() |
Schema |
SchemaTypeAdapter.read(com.google.gson.stream.JsonReader reader) |
| Modifier and Type | Method and Description |
|---|---|
void |
SchemaTypeAdapter.write(com.google.gson.stream.JsonWriter writer,
Schema schema) |
Copyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.