The SmartTablesSDK provides a comprehensive solution for managing structured data tables with advanced querying, filtering, sorting, and data manipulation capabilities. Build powerful data management applications with ease, featuring support for custom views, data import/export, and AI-powered data processing.Documentation Index
Fetch the complete documentation index at: https://learn.getodin.ai/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Quick Start
In this example, you will learn how to use the SmartTablesSDK to programmatically create and manage structured data tables through the Odin AI API. You start by initializing the SDK with your API credentials (base URL, project ID, API key, and secret), then follow a straightforward workflow to build a functional database: first, you create a new table withcreateTable() by providing a name and description (in this case, “Customer Database”), then you define the table’s structure by adding columns with addColumn(), specifying each column’s name, data type (like ‘text’ or ‘email’), and description. Once your table structure is set up, you can populate it with data using addRow() to insert records as key-value pairs, and finally query your data with queryTable(), which supports filtering (using operators like ‘contains’), pagination, and other query parameters to retrieve exactly the data you need. This gives you a complete programmatic solution for creating database-like structures with AI-powered capabilities, perfect for building dynamic data management systems, CRM tools, or any application where you need to store, organize, and query structured information through an API—all without managing traditional database infrastructure.
Configuration
SmartTablesSDKConfig Interface
Core Concepts
SmartTable
A SmartTable represents a structured data table with schema, metadata, and data management capabilities.SmartTableColumn
Defines the structure and properties of table columns.Filtering & Querying
Advanced filtering system with multiple operators and sorting options.Table Management
getAllTables()
Retrieve all tables in the project.
getTable(tableId)
Get a specific table by ID.
createTable(title, description, metadata?)
Create a new table.
updateTable(tableId, title, description?, metadata?)
Update table metadata.
deleteTable(tableId)
Delete a table and all its data permanently.
Column Operations
addColumn(tableId, column)
Add a new column to the table.
updateColumn(tableId, columnName, updates)
Update column properties.
deleteColumn(tableId, columnName)
Remove a column from the table.
Data Operations
addRow(tableId, data)
Add a new row to the table.
updateRow(tableId, rowId, columnName, newValue)
Update a specific cell in the table.
deleteRow(tableId, rowId)
Delete a row from the table.
Querying & Filtering
queryTable(tableId, options?)
Query table data with advanced filtering, sorting, and pagination.
Basic Query
Filtered Query
Sorted Query with Pagination
Data Import/Export
importTable(title, description, columnMappings, file)
Import data from CSV or Excel files.
AI-Powered Features
computeRowColumns(dataTypeId, rowId, columnNames?)
Trigger AI computation for specific row columns.
computeAllRows(dataTypeId)
Trigger AI computation for all rows in the table.
Error Handling
The SmartTablesSDK uses the same error handling as other SDK components:Examples
Complete Data Management Application
In this example, you will learn how to build a complete product management system using the SmartTablesSDK with a well-structured class that handles inventory and product information. TheProductManager class initializes the SDK with environment variables and provides a full workflow for managing a product catalog: the initializeTable() method creates a new “Product Catalog” table and sets up a comprehensive schema with eight columns including various data types (text, number, boolean, email, url, and date), along with constraints like notNull for required fields and defaultValue for stock availability. Once initialized, you can add products using addProduct(), which inserts new rows and automatically timestamps each entry with the current date, and perform sophisticated searches with searchProducts(), which lets you filter products by category, price range (using ‘gte’ and ‘lte’ operators for greater-than-or-equal and less-than-or-equal comparisons), apply text search across the table, and sort results alphabetically by product name. This gives you a production-ready pattern for building e-commerce inventory systems, product databases, or any application requiring structured data management with advanced querying capabilities—demonstrating how to combine multiple filter conditions, pagination, sorting, and search functionality into a cohesive data management solution.
Best Practices
Efficient Querying
- Use pagination for large datasets
- Apply filters to reduce data transfer
- Combine multiple operations when possible
Schema Design
- Define appropriate column types
- Use constraints (notNull, unique) appropriately
- Provide meaningful descriptions
Error Handling and Validation
- Always handle errors gracefully
- Validate data before operations
- Use transactions for related operations

