software.amazon.awscdk.services.glue.alpha.DataFormat Maven / Gradle / Ivy
Show all versions of glue-alpha Show documentation
package software.amazon.awscdk.services.glue.alpha;
/**
* (experimental) Defines the input/output formats and ser/de for a single DataFormat.
*
* Example:
*
*
* Database myDatabase;
* S3Table.Builder.create(this, "MyTable")
* .database(myDatabase)
* .columns(List.of(Column.builder()
* .name("col1")
* .type(Schema.STRING)
* .build()))
* .partitionKeys(List.of(Column.builder()
* .name("year")
* .type(Schema.SMALL_INT)
* .build(), Column.builder()
* .name("month")
* .type(Schema.SMALL_INT)
* .build()))
* .dataFormat(DataFormat.JSON)
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.99.0 (build 8f757e4)", date = "2024-06-13T18:49:27.653Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.glue.alpha.$Module.class, fqn = "@aws-cdk/aws-glue-alpha.DataFormat")
public class DataFormat extends software.amazon.jsii.JsiiObject {
protected DataFormat(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected DataFormat(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
static {
APACHE_LOGS = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.glue.alpha.DataFormat.class, "APACHE_LOGS", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.DataFormat.class));
AVRO = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.glue.alpha.DataFormat.class, "AVRO", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.DataFormat.class));
CLOUDTRAIL_LOGS = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.glue.alpha.DataFormat.class, "CLOUDTRAIL_LOGS", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.DataFormat.class));
CSV = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.glue.alpha.DataFormat.class, "CSV", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.DataFormat.class));
JSON = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.glue.alpha.DataFormat.class, "JSON", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.DataFormat.class));
LOGSTASH = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.glue.alpha.DataFormat.class, "LOGSTASH", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.DataFormat.class));
ORC = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.glue.alpha.DataFormat.class, "ORC", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.DataFormat.class));
PARQUET = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.glue.alpha.DataFormat.class, "PARQUET", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.DataFormat.class));
TSV = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.glue.alpha.DataFormat.class, "TSV", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.DataFormat.class));
}
/**
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public DataFormat(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.glue.alpha.DataFormatProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* (experimental) DataFormat for Apache Web Server Logs.
*
* Also works for CloudFront logs
*
* @see https://docs.aws.amazon.com/athena/latest/ug/apache.html
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public final static software.amazon.awscdk.services.glue.alpha.DataFormat APACHE_LOGS;
/**
* (experimental) DataFormat for Apache Avro.
*
* @see https://docs.aws.amazon.com/athena/latest/ug/avro.html
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public final static software.amazon.awscdk.services.glue.alpha.DataFormat AVRO;
/**
* (experimental) DataFormat for CloudTrail logs stored on S3.
*
* @see https://docs.aws.amazon.com/athena/latest/ug/cloudtrail.html
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public final static software.amazon.awscdk.services.glue.alpha.DataFormat CLOUDTRAIL_LOGS;
/**
* (experimental) DataFormat for CSV Files.
*
* @see https://docs.aws.amazon.com/athena/latest/ug/csv.html
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public final static software.amazon.awscdk.services.glue.alpha.DataFormat CSV;
/**
* (experimental) Stored as plain text files in JSON format.
*
* Uses OpenX Json SerDe for serialization and deseralization.
*
* @see https://docs.aws.amazon.com/athena/latest/ug/json.html
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public final static software.amazon.awscdk.services.glue.alpha.DataFormat JSON;
/**
* (experimental) DataFormat for Logstash Logs, using the GROK SerDe.
*
* @see https://docs.aws.amazon.com/athena/latest/ug/grok.html
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public final static software.amazon.awscdk.services.glue.alpha.DataFormat LOGSTASH;
/**
* (experimental) DataFormat for Apache ORC (Optimized Row Columnar).
*
* @see https://docs.aws.amazon.com/athena/latest/ug/orc.html
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public final static software.amazon.awscdk.services.glue.alpha.DataFormat ORC;
/**
* (experimental) DataFormat for Apache Parquet.
*
* @see https://docs.aws.amazon.com/athena/latest/ug/parquet.html
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public final static software.amazon.awscdk.services.glue.alpha.DataFormat PARQUET;
/**
* (experimental) DataFormat for TSV (Tab-Separated Values).
*
* @see https://docs.aws.amazon.com/athena/latest/ug/lazy-simple-serde.html
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public final static software.amazon.awscdk.services.glue.alpha.DataFormat TSV;
/**
* (experimental) InputFormat
for this data format.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.glue.alpha.InputFormat getInputFormat() {
return software.amazon.jsii.Kernel.get(this, "inputFormat", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.InputFormat.class));
}
/**
* (experimental) OutputFormat
for this data format.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.glue.alpha.OutputFormat getOutputFormat() {
return software.amazon.jsii.Kernel.get(this, "outputFormat", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.OutputFormat.class));
}
/**
* (experimental) Serialization library for this data format.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.glue.alpha.SerializationLibrary getSerializationLibrary() {
return software.amazon.jsii.Kernel.get(this, "serializationLibrary", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.SerializationLibrary.class));
}
/**
* (experimental) Classification string given to tables with this data format.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.glue.alpha.ClassificationString getClassificationString() {
return software.amazon.jsii.Kernel.get(this, "classificationString", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.ClassificationString.class));
}
/**
* (experimental) A fluent builder for {@link software.amazon.awscdk.services.glue.alpha.DataFormat}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static Builder create() {
return new Builder();
}
private final software.amazon.awscdk.services.glue.alpha.DataFormatProps.Builder props;
private Builder() {
this.props = new software.amazon.awscdk.services.glue.alpha.DataFormatProps.Builder();
}
/**
* (experimental) InputFormat
for this data format.
*
* @return {@code this}
* @param inputFormat InputFormat
for this data format. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder inputFormat(final software.amazon.awscdk.services.glue.alpha.InputFormat inputFormat) {
this.props.inputFormat(inputFormat);
return this;
}
/**
* (experimental) OutputFormat
for this data format.
*
* @return {@code this}
* @param outputFormat OutputFormat
for this data format. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder outputFormat(final software.amazon.awscdk.services.glue.alpha.OutputFormat outputFormat) {
this.props.outputFormat(outputFormat);
return this;
}
/**
* (experimental) Serialization library for this data format.
*
* @return {@code this}
* @param serializationLibrary Serialization library for this data format. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder serializationLibrary(final software.amazon.awscdk.services.glue.alpha.SerializationLibrary serializationLibrary) {
this.props.serializationLibrary(serializationLibrary);
return this;
}
/**
* (experimental) Classification string given to tables with this data format.
*
* Default: - No classification is specified.
*
* @return {@code this}
* @param classificationString Classification string given to tables with this data format. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder classificationString(final software.amazon.awscdk.services.glue.alpha.ClassificationString classificationString) {
this.props.classificationString(classificationString);
return this;
}
/**
* @return a newly built instance of {@link software.amazon.awscdk.services.glue.alpha.DataFormat}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public software.amazon.awscdk.services.glue.alpha.DataFormat build() {
return new software.amazon.awscdk.services.glue.alpha.DataFormat(
this.props.build()
);
}
}
}