Class CatalogTable
Provides a Glue Catalog Table Resource. You can refer to the Glue Developer Guide for a full explanation of the Glue Data Catalog functionality.
Example Usage
Basic Table
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var awsGlueCatalogTable = new Aws.Glue.CatalogTable("awsGlueCatalogTable", new Aws.Glue.CatalogTableArgs
{
DatabaseName = "MyCatalogDatabase",
Name = "MyCatalogTable",
});
}
}
Parquet Table for Athena
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var awsGlueCatalogTable = new Aws.Glue.CatalogTable("awsGlueCatalogTable", new Aws.Glue.CatalogTableArgs
{
DatabaseName = "MyCatalogDatabase",
Name = "MyCatalogTable",
Parameters =
{
{ "EXTERNAL", "TRUE" },
{ "parquet.compression", "SNAPPY" },
},
StorageDescriptor = new Aws.Glue.Inputs.CatalogTableStorageDescriptorArgs
{
Columns =
{
new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs
{
Name = "my_string",
Type = "string",
},
new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs
{
Name = "my_double",
Type = "double",
},
new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs
{
Comment = "",
Name = "my_date",
Type = "date",
},
new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs
{
Comment = "",
Name = "my_bigint",
Type = "bigint",
},
new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs
{
Comment = "",
Name = "my_struct",
Type = "struct<my_nested_string:string>",
},
},
InputFormat = "org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat",
Location = "s3://my-bucket/event-streams/my-stream",
OutputFormat = "org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat",
SerDeInfo = new Aws.Glue.Inputs.CatalogTableStorageDescriptorSerDeInfoArgs
{
Name = "my-stream",
Parameters =
{
{ "serialization.format", 1 },
},
SerializationLibrary = "org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe",
},
},
TableType = "EXTERNAL_TABLE",
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Glue
Assembly: Pulumi.Aws.dll
Syntax
public class CatalogTable : CustomResource
Constructors
View SourceCatalogTable(String, CatalogTableArgs, CustomResourceOptions)
Create a CatalogTable resource with the given unique name, arguments, and options.
Declaration
public CatalogTable(string name, CatalogTableArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| CatalogTableArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceCatalogId
ID of the Glue Catalog and database to create the table in. If omitted, this defaults to the AWS Account ID plus the database name.
Declaration
public Output<string> CatalogId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DatabaseName
Name of the metadata database where the table metadata resides. For Hive compatibility, this must be all lowercase.
Declaration
public Output<string> DatabaseName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
Description of the table.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
Name of the SerDe.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Owner
Owner of the table.
Declaration
public Output<string> Owner { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Parameters
A map of initialization parameters for the SerDe, in key-value form.
Declaration
public Output<ImmutableDictionary<string, string>> Parameters { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>> |
PartitionKeys
A list of columns by which the table is partitioned. Only primitive types are supported as partition keys.
Declaration
public Output<ImmutableArray<CatalogTablePartitionKey>> PartitionKeys { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<CatalogTablePartitionKey>> |
Retention
Retention time for this table.
Declaration
public Output<int?> Retention { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
StorageDescriptor
A storage descriptor object containing information about the physical storage of this table. You can refer to the Glue Developer Guide for a full explanation of this object.
Declaration
public Output<CatalogTableStorageDescriptor> StorageDescriptor { get; }
Property Value
| Type | Description |
|---|---|
| Output<CatalogTableStorageDescriptor> |
TableType
The type of this table (EXTERNAL_TABLE, VIRTUAL_VIEW, etc.).
Declaration
public Output<string> TableType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ViewExpandedText
If the table is a view, the expanded text of the view; otherwise null.
Declaration
public Output<string> ViewExpandedText { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ViewOriginalText
If the table is a view, the original text of the view; otherwise null.
Declaration
public Output<string> ViewOriginalText { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, CatalogTableState, CustomResourceOptions)
Get an existing CatalogTable resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static CatalogTable Get(string name, Input<string> id, CatalogTableState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| CatalogTableState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| CatalogTable |