# AML Table Model > Reference for AML Table Model syntax, covering all parameters (type, label, data source, dimensions, measures) and a code example to map a table to a model. :::tip Knowledge Checkpoint A grasp of these concepts will help you understand this documentation better: - [Table Model](/docs/table-models) ::: ## Introduction [Table Model](/docs/table-models) defines a data model that sits on top of a SQL table. ## Parameter definition Parameter name | Description -------------- | ------------ type | Model type: `'table'` for Table Model, `'query'` for Query Model label | User-friendly name for the model that appears in the Dataset exploration UI description | Description of the model. Support Markdown. data_source_name | The database on which Holistics will execute the SQL generated from this model owner | Define who should be in charge of managing the current model table_name | Path to the table underlying this model, in the form: `'"schema_name"."table_name"'` dimension | Define a dimension. measure | Define a measure. ## Code Example ```aml Model users { type: 'table' label: "Users" data_source_name: 'your_datasource_name' table_name: 'ecommerce.users' // underlying table of the model dimension id { label: 'ID' type: 'number' primary_key: true // recommended for query optimization and AQL features hidden: false // optional definition: @sql {{#SOURCE.id}};; // optional } dimension email { label: 'Email' type: 'text' // without "definition", it automatically uses the same column name as the dimension name ('email') } measure user_count { type: 'number' label: 'Count Users' definition: @aql count(users.id);; } } ```