HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/local/aws-cli/v2/dist/awscli/examples/glue/create-table.rst
**Example 1: To create a table for a Kinesis data stream** 

The following ``create-table`` example creates a table in the AWS Glue Data Catalog that describes a Kinesis data stream. ::

    aws glue create-table \
        --database-name tempdb \
        --table-input  '{"Name":"test-kinesis-input", "StorageDescriptor":{ \
                "Columns":[ \
                    {"Name":"sensorid", "Type":"int"}, \
                    {"Name":"currenttemperature", "Type":"int"}, \
                    {"Name":"status", "Type":"string"}
                ], \
                "Location":"my-testing-stream", \
                "Parameters":{ \
                    "typeOfData":"kinesis","streamName":"my-testing-stream", \
                    "kinesisUrl":"https://kinesis.us-east-1.amazonaws.com" \
                }, \
                "SerdeInfo":{ \
                    "SerializationLibrary":"org.openx.data.jsonserde.JsonSerDe"} \
            }, \
            "Parameters":{ \
                "classification":"json"} \
            }' \
        --profile my-profile \
        --endpoint https://glue.us-east-1.amazonaws.com 

This command produces no output.

For more information, see `Defining Tables in the AWS Glue Data Catalog <https://docs.aws.amazon.com/glue/latest/dg/tables-described.html>`__ in the *AWS Glue Developer Guide*.

**Example 2: To create a table for a Kafka data store** 

The following ``create-table`` example creates a table in the AWS Glue Data Catalog that describes a Kafka data store. ::

        aws glue create-table \
            --database-name tempdb \
            --table-input  '{"Name":"test-kafka-input", "StorageDescriptor":{ \
                    "Columns":[ \
                        {"Name":"sensorid", "Type":"int"}, \
                        {"Name":"currenttemperature", "Type":"int"}, \
                        {"Name":"status", "Type":"string"}
                    ], \
                    "Location":"glue-topic", \
                    "Parameters":{ \
                        "typeOfData":"kafka","topicName":"glue-topic", \
                        "connectionName":"my-kafka-connection"
                    }, \
                    "SerdeInfo":{ \
                        "SerializationLibrary":"org.apache.hadoop.hive.serde2.OpenCSVSerde"} \
                }, \
                "Parameters":{ \
                    "separatorChar":","} \
                }' \
            --profile my-profile \
            --endpoint https://glue.us-east-1.amazonaws.com 

This command produces no output.

For more information, see `Defining Tables in the AWS Glue Data Catalog <https://docs.aws.amazon.com/glue/latest/dg/tables-described.html>`__ in the *AWS Glue Developer Guide*.

**Example 3: To create a table for a AWS S3 data store** 

The following ``create-table`` example creates a table in the AWS Glue Data Catalog that 
describes a AWS Simple Storage Service (AWS S3) data store. ::

        aws glue create-table \
            --database-name tempdb \
            --table-input  '{"Name":"s3-output", "StorageDescriptor":{ \
                    "Columns":[ \
                        {"Name":"s1", "Type":"string"}, \
                        {"Name":"s2", "Type":"int"}, \
                        {"Name":"s3", "Type":"string"}
                    ], \
                    "Location":"s3://bucket-path/", \
                    "SerdeInfo":{ \
                        "SerializationLibrary":"org.openx.data.jsonserde.JsonSerDe"} \
                }, \
                "Parameters":{ \
                    "classification":"json"} \
                }' \
            --profile my-profile \
            --endpoint https://glue.us-east-1.amazonaws.com 

This command produces no output.

For more information, see `Defining Tables in the AWS Glue Data Catalog <https://docs.aws.amazon.com/glue/latest/dg/tables-described.html>`__ in the *AWS Glue Developer Guide*.