Class DatePartitionProjectionConfigurationProps
(experimental) Properties for DATE partition projection configuration.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.Glue.Alpha
Assembly: Amazon.CDK.AWS.Glue.Alpha.dll
Syntax (csharp)
public class DatePartitionProjectionConfigurationProps : IDatePartitionProjectionConfigurationProps
Syntax (vb)
Public Class DatePartitionProjectionConfigurationProps Implements IDatePartitionProjectionConfigurationProps
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
Database myDatabase;
new S3Table(this, "MyTable", new S3TableProps {
Database = myDatabase,
Columns = new [] { new Column {
Name = "data",
Type = Schema.STRING
} },
PartitionKeys = new [] { new Column {
Name = "date",
Type = Schema.STRING
} },
DataFormat = DataFormat.JSON,
PartitionProjection = new Dictionary<string, PartitionProjectionConfiguration> {
{ "date", PartitionProjectionConfiguration.Date(new DatePartitionProjectionConfigurationProps {
Min = "2020-01-01",
Max = "2023-12-31",
Format = "yyyy-MM-dd",
Interval = 1, // optional, defaults to 1
IntervalUnit = DateIntervalUnit.DAYS
}) }
}
});
Synopsis
Constructors
| DatePartitionProjectionConfigurationProps() | (experimental) Properties for DATE partition projection configuration. |
Properties
| Format | (experimental) Date format for partition values. |
| Interval | (experimental) Interval between partition values. |
| IntervalUnit | (experimental) Unit for the interval. |
| Max | (experimental) End date for the partition range (inclusive). |
| Min | (experimental) Start date for the partition range (inclusive). |
Constructors
DatePartitionProjectionConfigurationProps()
(experimental) Properties for DATE partition projection configuration.
public DatePartitionProjectionConfigurationProps()
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
Database myDatabase;
new S3Table(this, "MyTable", new S3TableProps {
Database = myDatabase,
Columns = new [] { new Column {
Name = "data",
Type = Schema.STRING
} },
PartitionKeys = new [] { new Column {
Name = "date",
Type = Schema.STRING
} },
DataFormat = DataFormat.JSON,
PartitionProjection = new Dictionary<string, PartitionProjectionConfiguration> {
{ "date", PartitionProjectionConfiguration.Date(new DatePartitionProjectionConfigurationProps {
Min = "2020-01-01",
Max = "2023-12-31",
Format = "yyyy-MM-dd",
Interval = 1, // optional, defaults to 1
IntervalUnit = DateIntervalUnit.DAYS
}) }
}
});
Properties
Format
(experimental) Date format for partition values.
public string Format { get; set; }
Property Value
Remarks
Uses Java SimpleDateFormat patterns.
Stability: Experimental
See: https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html
Interval
(experimental) Interval between partition values.
public double? Interval { get; set; }
Property Value
Remarks
When the provided dates are at single-day or single-month precision, the interval is optional and defaults to 1 day or 1 month, respectively. Otherwise, interval is required.
Default: - 1 for single-day or single-month precision, otherwise required
Stability: Experimental
IntervalUnit
(experimental) Unit for the interval.
public DateIntervalUnit? IntervalUnit { get; set; }
Property Value
Remarks
When the provided dates are at single-day or single-month precision, the intervalUnit is optional and defaults to 1 day or 1 month, respectively. Otherwise, the intervalUnit is required.
Default: - DAYS for single-day precision, MONTHS for single-month precision, otherwise required
Stability: Experimental
Max
(experimental) End date for the partition range (inclusive).
public string Max { get; set; }
Property Value
Remarks
Can be either:
Same format constraints as min.
Stability: Experimental
Min
(experimental) Start date for the partition range (inclusive).
public string Min { get; set; }
Property Value
Remarks
Can be either:
Stability: Experimental