Operations 16
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Ask an LLM
“Which tables exist inside one of my Treasure Data databases?”
“Can I see every table a given database holds before I write a query?”
Tell an agent
List all tables in database {database_name}.
Show me what tables live in the {database_name} database.
Ask an LLM
“What schema, row count and settings does a specific table have?”
“Can I get a single table's details including its column descriptions?”
Tell an agent
Show table {table_name} in database {database_name}.
Get the details of {database_name}.{table_name}, include_descriptions={include_descriptions}.
Ask an LLM
“How do I drop a table I no longer need from a database?”
“Is it possible to get rid of an old table entirely?”
Tell an agent destructive · confirm first
Delete table {table_name} from database {database_name}.
Drop the {database_name}.{table_name} table.
POST
/table/create/{database_name}/{table_name}/{table_type}
Create a table with an explicit table type · Create table with specified type
#
Ask an LLM
“Can I create a table and state its table type in the request path?”
“Which table type can I pass when creating a table with an explicit type?”
Tell an agent
Create a {table_type} table named {table_name} in database {database_name}.
Create table {table_name} of type {table_type} in {database_name}, copying properties from {source_table}.
POST
/table/create/{database_name}/{table_name}
Create a table with the default log type · Create table
#
Ask an LLM
“How do I create a new table in a database without choosing a table type?”
“Can a new table expire its data after a set number of days?”
Tell an agent
Create a new table {table_name} in database {database_name} using the default type.
Create table {table_name} in {database_name} that expires data after {expire_days} days.
Ask an LLM
“Can I change a table's description or data expiration after it was created?”
“Is there a way to turn on schema detection for an existing table?”
Tell an agent
Update the description of table {table_name} in {database_name} to {description}.
Set the expiration of {database_name}.{table_name} to {expire_days} days.
POST
/table/rename/{database_name}/{current_table_name}/{new_table_name}
Rename a table · Rename table
#
Ask an LLM
“How do I give an existing table a new name?”
“Can I rename a table without moving it to another database?”
Tell an agent
Rename table {current_table_name} in {database_name} to {new_table_name}.
Change the name of the {current_table_name} table in {database_name} to {new_table_name}.
POST
/table/swap/{database_name}/{table_name_1}/{table_name_2}
Swap two tables in a database · Swap tables
#
Ask an LLM
“Can I swap two tables so each takes the other's name?”
“Is there a way to switch a staging table into place with the live table?”
Tell an agent
Swap tables {table_name_1} and {table_name_2} in database {database_name}.
Exchange the names of {table_name_1} and {table_name_2} in {database_name} so the new one goes live.
GET
/table/tail/{database_name}/{table_name}{path_format}
Show the latest record in a table · Tail table
#
Ask an LLM
“What is the most recent record written to a table?”
“Can I peek at the last row of a table in a specific output format?”
Tell an agent
Tail table {table_name} in {database_name} using path format {path_format}.
Show the last record of {database_name}.{table_name}{path_format} formatted as {format}.
GET
/table/distribution/{database_name}/{table_name}
Get a table's distribution · Get table distribution
#
Ask an LLM
“How is a table's data distributed?”
“Can I retrieve the distribution settings for one table?”
Tell an agent
Get the distribution of table {table_name} in {database_name}.
Show how {database_name}.{table_name} is distributed.
POST
/table/change_database/{database_name}/{table_name}
Move a table to another database · Change database
#
Ask an LLM
“Can I move a table from one database into another in my account?”
“How do I relocate a table to a different database?”
Tell an agent
Move table {table_name} from {database_name} into database {dest_database_name}.
Relocate {database_name}.{table_name} to the {dest_database_name} database in this account.
POST
/table/transfer/{database_name}/{table_name}
Transfer a table to a different account · Transfer table to a different account
#
Ask an LLM
“Is it possible to hand a table over to a different Treasure Data account?”
“What destination details do I need to transfer a table to another account?”
Tell an agent
Transfer {database_name}.{table_name} to another account as {dest_database_name}.{dest_table_name}.
Hand table {table_name} from {database_name} over to another account's {dest_database_name} database as {dest_table_name}.
POST
/table/append-schema/{database_name}/{table_name}
Append columns to a table's schema · Append table schema
#
Ask an LLM
“Can I add new columns to a table's schema while keeping the existing ones?”
“How do I extend a table schema with extra fields?”
Tell an agent
Append columns {schema} to the schema of {database_name}.{table_name}.
Add the new columns {schema} to table {table_name} in {database_name} without touching existing columns.
POST
/table/update-schema/{database_name}/{table_name}
Replace a table's schema · Update table schema
#
Ask an LLM
“Can I redefine a table's whole schema, including column descriptions?”
“What format do column descriptions take when rewriting a table schema?”
Tell an agent
Replace the schema of {database_name}.{table_name} with {schema}.
Overwrite the schema of table {table_name} in {database_name} with {schema}.
Ask an LLM
“Which deleted tables can I still recover?”
“Can I narrow the recoverable deleted tables to one database?”
Tell an agent
List my recoverable deleted tables.
Show deleted tables from database {database_id}, {page_size} per page.
Ask an LLM
“How do I restore a table I deleted by mistake?”
“Does recovering a table also bring back its deleted parent database?”
Tell an agent
Recover deleted table {table_id}.
Restore deleted table {table_id} under the name {table_name}.