Class TableBaseProps
Inheritance
Implements
Namespace: Amazon.CDK.AWS.Glue.Alpha
Assembly: Amazon.CDK.AWS.Glue.Alpha.dll
Syntax (csharp)
public class TableBaseProps : Object, ITableBaseProps
Syntax (vb)
Public Class TableBaseProps
Inherits Object
Implements ITableBaseProps
Remarks
Stability: Experimental
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Glue.Alpha;
Database database;
DataFormat dataFormat;
StorageParameter storageParameter;
var tableBaseProps = new TableBaseProps {
Columns = new [] { new Column {
Name = "name",
Type = new Type {
InputString = "inputString",
IsPrimitive = false
},
// the properties below are optional
Comment = "comment"
} },
Database = database,
DataFormat = dataFormat,
// the properties below are optional
Compressed = false,
Description = "description",
EnablePartitionFiltering = false,
Parameters = new Dictionary<string, string> {
{ "parametersKey", "parameters" }
},
PartitionIndexes = new [] { new PartitionIndex {
KeyNames = new [] { "keyNames" },
// the properties below are optional
IndexName = "indexName"
} },
PartitionKeys = new [] { new Column {
Name = "name",
Type = new Type {
InputString = "inputString",
IsPrimitive = false
},
// the properties below are optional
Comment = "comment"
} },
StorageParameters = new [] { storageParameter },
StoredAsSubDirectories = false,
TableName = "tableName"
};
Synopsis
Constructors
TableBaseProps() |
Properties
Columns | (experimental) Columns of the table. |
Compressed | (experimental) Indicates whether the table's data is compressed or not. |
Database | (experimental) Database in which to store the table. |
DataFormat | (experimental) Storage type of the table's data. |
Description | (experimental) Description of the table. |
EnablePartitionFiltering | (experimental) Enables partition filtering. |
Parameters | (experimental) The key/value pairs define properties associated with the table. |
PartitionIndexes | (experimental) Partition indexes on the table. |
PartitionKeys | (experimental) Partition columns of the table. |
StorageParameters | (experimental) The user-supplied properties for the description of the physical storage of this table. |
StoredAsSubDirectories | (experimental) Indicates whether the table data is stored in subdirectories. |
TableName | (experimental) Name of the table. |
Constructors
TableBaseProps()
public TableBaseProps()
Properties
Columns
(experimental) Columns of the table.
public IColumn[] Columns { get; set; }
Property Value
IColumn[]
Remarks
Stability: Experimental
Compressed
(experimental) Indicates whether the table's data is compressed or not.
public Nullable<bool> Compressed { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
Stability: Experimental
Database
(experimental) Database in which to store the table.
public IDatabase Database { get; set; }
Property Value
Remarks
Stability: Experimental
DataFormat
(experimental) Storage type of the table's data.
public DataFormat DataFormat { get; set; }
Property Value
Remarks
Stability: Experimental
Description
(experimental) Description of the table.
public string Description { get; set; }
Property Value
System.String
Remarks
Default: generated
Stability: Experimental
EnablePartitionFiltering
(experimental) Enables partition filtering.
public Nullable<bool> EnablePartitionFiltering { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - The parameter is not defined
Stability: Experimental
Parameters
(experimental) The key/value pairs define properties associated with the table.
public IDictionary<string, string> Parameters { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
The key/value pairs that are allowed to be submitted are not limited, however their functionality is not guaranteed.
Default: - The parameter is not defined
Stability: Experimental
PartitionIndexes
(experimental) Partition indexes on the table.
public IPartitionIndex[] PartitionIndexes { get; set; }
Property Value
Remarks
A maximum of 3 indexes are allowed on a table. Keys in the index must be part of the table's partition keys.
Default: table has no partition indexes
Stability: Experimental
PartitionKeys
(experimental) Partition columns of the table.
public IColumn[] PartitionKeys { get; set; }
Property Value
IColumn[]
Remarks
Default: table is not partitioned
Stability: Experimental
StorageParameters
(experimental) The user-supplied properties for the description of the physical storage of this table.
public StorageParameter[] StorageParameters { get; set; }
Property Value
Remarks
These properties help describe the format of the data that is stored within the crawled data sources.
The key/value pairs that are allowed to be submitted are not limited, however their functionality is not guaranteed.
Some keys will be auto-populated by glue crawlers, however, you can override them by specifying the key and value in this property.
Default: - The parameter is not defined
Stability: Experimental
See: https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_EXTERNAL_TABLE.html#r_CREATE_EXTERNAL_TABLE-parameters - under "TABLE PROPERTIES"
Examples
IDatabase glueDatabase;
var table = new Table(this, "Table", new S3TableProps {
StorageParameters = new [] { StorageParameter.SkipHeaderLineCount(1), StorageParameter.CompressionType(CompressionType.GZIP), StorageParameter.Custom("foo", "bar"), StorageParameter.Custom("separatorChar", ","), StorageParameter.Custom(StorageParameters.WRITE_PARALLEL, "off") },
// ...
Database = glueDatabase,
Columns = new [] { new Column {
Name = "col1",
Type = Schema.STRING
} },
DataFormat = DataFormat.CSV
});
StoredAsSubDirectories
(experimental) Indicates whether the table data is stored in subdirectories.
public Nullable<bool> StoredAsSubDirectories { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
Stability: Experimental
TableName
(experimental) Name of the table.
public string TableName { get; set; }
Property Value
System.String
Remarks
Default: - generated by CDK.
Stability: Experimental