PartitionIndex |
## Example Usage
```java
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.glue.CatalogDatabase;
import com.pulumi.aws.glue.CatalogDatabaseArgs;
import com.pulumi.aws.glue.CatalogTable;
import com.pulumi.aws.glue.CatalogTableArgs;
import com.pulumi.aws.glue.inputs.CatalogTableStorageDescriptorArgs;
import com.pulumi.aws.glue.inputs.CatalogTableStorageDescriptorSerDeInfoArgs;
import com.pulumi.aws.glue.inputs.CatalogTableStorageDescriptorSkewedInfoArgs;
import com.pulumi.aws.glue.inputs.CatalogTablePartitionKeyArgs;
import com.pulumi.aws.glue.PartitionIndex;
import com.pulumi.aws.glue.PartitionIndexArgs;
import com.pulumi.aws.glue.inputs.PartitionIndexPartitionIndexArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleCatalogDatabase = new CatalogDatabase("exampleCatalogDatabase", CatalogDatabaseArgs.builder()
.name("example")
.build());
var exampleCatalogTable = new CatalogTable("exampleCatalogTable", CatalogTableArgs.builder()
.name("example")
.databaseName(exampleCatalogDatabase.name())
.owner("my_owner")
.retention(1)
.tableType("VIRTUAL_VIEW")
.viewExpandedText("view_expanded_text_1")
.viewOriginalText("view_original_text_1")
.storageDescriptor(CatalogTableStorageDescriptorArgs.builder()
.bucketColumns("bucket_column_1")
.compressed(false)
.inputFormat("SequenceFileInputFormat")
.location("my_location")
.numberOfBuckets(1)
.outputFormat("SequenceFileInputFormat")
.storedAsSubDirectories(false)
.parameters(Map.of("param1", "param1_val"))
.columns(
CatalogTableStorageDescriptorColumnArgs.builder()
.name("my_column_1")
.type("int")
.comment("my_column1_comment")
.build(),
CatalogTableStorageDescriptorColumnArgs.builder()
.name("my_column_2")
.type("string")
.comment("my_column2_comment")
.build())
.serDeInfo(CatalogTableStorageDescriptorSerDeInfoArgs.builder()
.name("ser_de_name")
.parameters(Map.of("param1", "param_val_1"))
.serializationLibrary("org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe")
.build())
.sortColumns(CatalogTableStorageDescriptorSortColumnArgs.builder()
.column("my_column_1")
.sortOrder(1)
.build())
.skewedInfo(CatalogTableStorageDescriptorSkewedInfoArgs.builder()
.skewedColumnNames("my_column_1")
.skewedColumnValueLocationMaps(Map.of("my_column_1", "my_column_1_val_loc_map"))
.skewedColumnValues("skewed_val_1")
.build())
.build())
.partitionKeys(
CatalogTablePartitionKeyArgs.builder()
.name("my_column_1")
.type("int")
.comment("my_column_1_comment")
.build(),
CatalogTablePartitionKeyArgs.builder()
.name("my_column_2")
.type("string")
.comment("my_column_2_comment")
.build())
.parameters(Map.of("param1", "param1_val"))
.build());
var examplePartitionIndex = new PartitionIndex("examplePartitionIndex", PartitionIndexArgs.builder()
.databaseName(exampleCatalogDatabase.name())
.tableName(exampleCatalogTable.name())
.partitionIndex(PartitionIndexPartitionIndexArgs.builder()
.indexName("example")
.keys(
"my_column_1",
"my_column_2")
.build())
.build());
}
}
```
## Import
Using `pulumi import`, import Glue Partition Indexes using the catalog ID (usually AWS account ID), database name, table name, and index name.
|