package awscdkgluealpha


// Example:
//   var myConnection connection
//   var myDatabase database
//
//   glue.NewExternalTable(this, jsii.String("MyTable"), &ExternalTableProps{
//   	Connection: myConnection,
//   	ExternalDataLocation: jsii.String("default_db_public_example"),
//   	 // A table in Redshift
//   	// ...
//   	Database: myDatabase,
//   	Columns: []column{
//   		&column{
//   			Name: jsii.String("col1"),
//   			Type: glue.Schema_STRING(),
//   		},
//   	},
//   	DataFormat: glue.DataFormat_JSON(),
//   })
//
// Experimental.
type ExternalTableProps struct {
	// Columns of the table.
	// Experimental.
	Columns *[]*Column `field:"required" json:"columns" yaml:"columns"`
	// Database in which to store the table.
	// Experimental.
	Database IDatabase `field:"required" json:"database" yaml:"database"`
	// Storage type of the table's data.
	// Experimental.
	DataFormat DataFormat `field:"required" json:"dataFormat" yaml:"dataFormat"`
	// Indicates whether the table's data is compressed or not.
	// Default: false.
	//
	// Experimental.
	Compressed *bool `field:"optional" json:"compressed" yaml:"compressed"`
	// Description of the table.
	// Default: generated.
	//
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// Enables partition filtering.
	// See: https://docs.aws.amazon.com/athena/latest/ug/glue-best-practices.html#glue-best-practices-partition-index
	//
	// Default: - The parameter is not defined.
	//
	// Experimental.
	EnablePartitionFiltering *bool `field:"optional" json:"enablePartitionFiltering" yaml:"enablePartitionFiltering"`
	// The key/value pairs define properties associated with the table.
	//
	// The key/value pairs that are allowed to be submitted are not limited, however their functionality is not guaranteed.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-parameters
	//
	// Default: - The parameter is not defined.
	//
	// Experimental.
	Parameters *map[string]*string `field:"optional" json:"parameters" yaml:"parameters"`
	// Partition indexes on the table.
	//
	// 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.
	//
	// Experimental.
	PartitionIndexes *[]*PartitionIndex `field:"optional" json:"partitionIndexes" yaml:"partitionIndexes"`
	// Partition columns of the table.
	// Default: table is not partitioned.
	//
	// Experimental.
	PartitionKeys *[]*Column `field:"optional" json:"partitionKeys" yaml:"partitionKeys"`
	// The user-supplied properties for the description of the physical storage of this table.
	//
	// 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.
	//
	// Example:
	//      declare const glueDatabase: glue.IDatabase;
	//      const table = new glue.Table(this, 'Table', {
	//        storageParameters: [
	//            glue.StorageParameter.skipHeaderLineCount(1),
	//            glue.StorageParameter.compressionType(glue.CompressionType.GZIP),
	//            glue.StorageParameter.custom('foo', 'bar'), // Will have no effect
	//            glue.StorageParameter.custom('separatorChar', ','), // Will describe the separator char used in the data
	//            glue.StorageParameter.custom(glue.StorageParameters.WRITE_PARALLEL, 'off'),
	//        ],
	//        // ...
	//        database: glueDatabase,
	//        columns: [{
	//            name: 'col1',
	//            type: glue.Schema.STRING,
	//        }],
	//        dataFormat: glue.DataFormat.CSV,
	//      });
	//
	// See: https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_EXTERNAL_TABLE.html#r_CREATE_EXTERNAL_TABLE-parameters - under _"TABLE PROPERTIES"_
	//
	// Default: - The parameter is not defined.
	//
	// Experimental.
	StorageParameters *[]StorageParameter `field:"optional" json:"storageParameters" yaml:"storageParameters"`
	// Indicates whether the table data is stored in subdirectories.
	// Default: false.
	//
	// Experimental.
	StoredAsSubDirectories *bool `field:"optional" json:"storedAsSubDirectories" yaml:"storedAsSubDirectories"`
	// Name of the table.
	// Default: - generated by CDK.
	//
	// Experimental.
	TableName *string `field:"optional" json:"tableName" yaml:"tableName"`
	// The connection the table will use when performing reads and writes.
	// Default: - No connection.
	//
	// Experimental.
	Connection IConnection `field:"required" json:"connection" yaml:"connection"`
	// The data source location of the glue table, (e.g. `default_db_public_example` for Redshift).
	//
	// If this property is set, it will override both `bucket` and `s3Prefix`.
	// Default: - No outsourced data source location.
	//
	// Experimental.
	ExternalDataLocation *string `field:"required" json:"externalDataLocation" yaml:"externalDataLocation"`
}

