Creating Models from Table¶
Pick a table and the columns you want, and AI pre-fills the dimensions and measures from the table's structure and sample data. You then refine the result.
Availability
- Who can do this: members with the Edit capability in the active Workspace.
When to use this method¶
Use From Table when you want a working Model quickly from one existing table and are happy to refine it yourself. If you need joins or transformations, use From SQL. If you want help with business context and relationships, use With Steward.
Create a Model from a table¶
- In Studio, click Models in the sidebar.
- Click + (New model) at the top of the Models list. The Create Model dialog opens.
- Select From Table.
- Choose a Data connection.
- Pick the Catalog and Schema where your connection shows them, then the Table.
- Untick any columns you don't want to import. All columns are selected by default.
- Click Create model. AI pre-fills the dimensions and measures, saves the Model and opens it for you to refine.
Selecting a table doesn't start anything. The Model is created only when you click Create model, which shows Creating… while it runs.
Table selection¶
The pickers show the catalogs (where applicable), schemas and tables that the connection's warehouse user can see. The Table list shows table names within the selected schema.
If the connection exposes no tables, you'll see: No tables are visible on this connection. None may exist, or this warehouse user may not have access. Check the connection's permissions in your warehouse.
Column selection¶
Once you select a table, its columns and data types are listed with the hint Choose which columns import as dimensions; refine types after creating.
- Tick or untick individual columns.
- Click Select all or Clear to change every column at once.
- The counter (for example 8 of 12 selected) shows how many columns will be imported.
Only the columns you select are used. Columns you untick, including their sample values, are not sent to AI. You need at least one selected column to create the Model.
What AI generates¶
When you click Create model, Actian AI Analyst reads the selected columns and up to 20 sample rows from the table. It sends the table name, the column names and data types, and up to 10 of the sample rows to the language model your organization uses. AI then:
- Analyzes columns: reads column names, data types and sample data.
- Classifies columns: decides which become dimensions and which become measures.
- Writes expressions: creates a SQL expression for each dimension and measure, and sets a unit and precision on measures where they're obvious (for example
USDfor a currency amount). - Sets the grain: identifies the columns that uniquely identify a row.
- Writes a description and guidance for the Model.
- Proposes a name: AI proposes a lowercase snake_case name. If it doesn't, the table name is used as it is, and the name must already be valid snake_case. If it isn't, you see Invalid model name and nothing is saved. If the name is already taken in your Workspace, it's adjusted so it doesn't clash. You can rename the Model afterwards.
Dimensions are created for columns that represent:
- Dates and timestamps
- Categories and enums
- IDs and foreign keys
- Text attributes
For dimensions that AI marks as Enum, the allowed values are read from your warehouse, up to 50 distinct values. A column with more distinct values than that becomes an ordinary dimension instead.
Measures are created for columns that represent:
- Numeric values suitable for aggregation
- Counts and quantities
Relationships are not created. Add them on the Model's Relationships tab, or ask Steward to propose them. See Relationships.
If something goes wrong¶
| What you see | What it means | What to do |
|---|---|---|
| A warning after the Model opens: AI couldn't draft this model, so only its columns were imported. Review it before use. | The language model timed out, returned an error, or gave an unusable response. The Model was still created, with the selected columns as dimensions only: no measures, and an empty description and guidance. | Add measures, a description and guidance yourself, or ask Steward to complete the Model. |
| A warehouse error message in the dialog | The connection couldn't be reached, or the warehouse user can't read the table. Nothing was saved. | Check the data connection and the warehouse user's access, then try again. |
| No tables in this schema | The selected schema has no tables the warehouse user can see. | Pick a different schema, or grant the warehouse user access. |
| Invalid model name | AI didn't propose a name and the table name isn't lowercase snake_case (for example ORDERS). Nothing was saved. |
Use From SQL with a snake_case Model name and the query SELECT * FROM <table>, or use With Steward. |
| A model with this name already exists | Another Model took the name while you were creating this one. Nothing was saved. | Try again. |
Tips¶
- Check dimension types and measure expressions, because AI may misclassify some columns.
- Add descriptions so AI Analysts know what each dimension and measure represents.
- Add common filters such as "active only" or "last 90 days". See Filters.
- Check column coverage: on the Model's Overview tab, the modeled indicator shows how many source columns are used by a dimension or measure.