awswrangler.timestream.create_table

awswrangler.timestream.create_table(database: str, table: str, memory_retention_hours: int, magnetic_retention_days: int, tags: Optional[Dict[str, str]] = None, boto3_session: Optional[boto3.session.Session] = None)str

Create a new Timestream database.

Note

If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account.

Parameters
  • database (str) – Database name.

  • table (str) – Table name.

  • memory_retention_hours (int) – The duration for which data must be stored in the memory store.

  • magnetic_retention_days (int) – The duration for which data must be stored in the magnetic store.

  • tags (Optional[Dict[str, str]]) – Key/Value dict to put on the table. Tags enable you to categorize databases and/or tables, for example, by purpose, owner, or environment. e.g. {“foo”: “boo”, “bar”: “xoo”})

  • boto3_session (boto3.Session(), optional) – Boto3 Session. The default boto3 Session will be used if boto3_session receive None.

Returns

The Amazon Resource Name that uniquely identifies this database. (ARN)

Return type

str

Examples

Creating a table.

>>> import awswrangler as wr
>>> arn = wr.timestream.create_table(
...     database="MyDatabase",
...     table="MyTable",
...     memory_retention_hours=3,
...     magnetic_retention_days=7
... )