You can call the DescribeTable operation to query the description such as the schema information, reserved read throughput, and reserved write throughput of a table.
Note For more information about the DescribeTable operation, see DescribeTable.
Prerequisites
- A Tablestore client is initialized. For more information, see Initialization.
- A data table is created.
API operations
/**
* Query the schema information and the reserved read throughput and reserved write throughput of the specified table.
*/
describeTable(params, callback)
Parameters
Parameter | Description |
---|---|
tableName | The name of the table. |
Examples
The following code provides an example on how to query the description of a table:
var client = require('./client');
var params = {
tableName: 'sampleTable'
};
client.describeTable(params, function (err, data) {
if (err) {
console.log('error:', err);
return;
}
console.log('success:', data);
});
For the detailed sample code, visit DescribeTable@GitHub.