mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-16 21:50:27 +00:00
7.4 KiB
7.4 KiB
Table
This schema defines the Table entity. A Table organizes data in rows and columns and is defined by a Schema. OpenMetadata does not have a separate abstraction for Schema. Both Table and Schema are captured in this entity.
Type: object
Properties
- id
required
- Unique identifier of this table instance.
- $ref: ../../type/basic.json#/definitions/uuid
- name
required
- Name of a table. Expected to be unique within a database.
- $ref: #/definitions/tableName
- description
- Description of a table.
- Type:
string
- href
- Link to this table resource.
- $ref: ../../type/basic.json#/definitions/href
- tableType
- $ref: #/definitions/tableType
- fullyQualifiedName
- Fully qualified name of a table in the form
serviceName.databaseName.tableName
. - Type:
string
- Fully qualified name of a table in the form
- columns
required
- Columns in this table.
- Type:
array
- Items
- $ref: #/definitions/column
- tableConstraints
- Table constraints.
- Type:
array
- Items
- $ref: #/definitions/tableConstraint
- usageSummary
- Latest usage information for this table.
- $ref: ../../type/usageDetails.json
- owner
- Owner of this table.
- $ref: ../../type/entityReference.json
- followers
- Followers of this table.
- $ref: ../../type/entityReference.json#/definitions/entityReferenceList
- database
- Reference to Database that contains this table.
- $ref: ../../type/entityReference.json
- tags
- Tags for this table.
- Type:
array
- Items
- $ref: ../../type/tagLabel.json
- joins
- Details of other tables this table is frequently joined with.
- $ref: #/definitions/tableJoins
- sampleData
- Sample data for a table.
- $ref: #/definitions/tableData
Types definitions in this schema
tableType
- This schema defines the type used for describing different types of tables.
- Type:
string
- The value is restricted to the following:
- "Regular"
- "External"
- "View"
- "SecureView"
- "MaterializedView"
columnDataType
- This enum defines the type of data stored in a column.
- Type:
string
- The value is restricted to the following:
- "NUMBER"
- "TINYINT"
- "SMALLINT"
- "INT"
- "BIGINT"
- "FLOAT"
- "DOUBLE"
- "DECIMAL"
- "NUMERIC"
- "TIMESTAMP"
- "TIME"
- "DATE"
- "DATETIME"
- "INTERVAL"
- "STRING"
- "MEDIUMTEXT"
- "TEXT"
- "CHAR"
- "VARCHAR"
- "BOOLEAN"
- "BINARY"
- "VARBINARY"
- "ARRAY"
- "BLOB"
- "LONGBLOB"
- "MEDIUMBLOB"
- "MAP"
- "STRUCT"
- "UNION"
- "SET"
- "GEOGRAPHY"
- "ENUM"
- "JSON"
columnConstraint
- This enum defines the type for column constraint.
- Type:
string
- The value is restricted to the following:
- "NULL"
- "NOT_NULL"
- "UNIQUE"
- "PRIMARY_KEY"
- Default: "NULL"
tableConstraint
- This enum defines the type for table constraint.
- Type:
object
- Properties
- constraintType
- Type:
string
- The value is restricted to the following:
- "UNIQUE"
- "PRIMARY_KEY"
- "FOREIGN_KEY"
- Type:
- columns
- List of column names corresponding to the constraint.
- Type:
array
- Items
- Type:
string
- constraintType
columnName
- Local name
not fully qualified name
of the column. - Type:
string
- The value must match this pattern:
^[^.]*$
- Length: between 1 and 64
tableName
- Local name
not fully qualified name
of a table. - Type:
string
- The value must match this pattern:
^[^.]*$
- Length: between 1 and 64
fullyQualifiedColumnName
- Fully qualified name of the column that includes
serviceName.databaseName.tableName.columnName
. - Type:
string
- Length: between 1 and 256
column
- This schema defines the type for a column in a table.
- Type:
object
- Properties
- name
required
- $ref: #/definitions/columnName
- columnDataType
required
- Data type of the column
int, date etc.
. - $ref: #/definitions/columnDataType
- Data type of the column
- description
- Description of the column.
- Type:
string
- fullyQualifiedName
- tags
- Tags associated with the column.
- Type:
array
- Items
- $ref: ../../type/tagLabel.json
- columnConstraint
- Column level constraint.
- $ref: #/definitions/columnConstraint
- ordinalPosition
- Ordinal position of the column.
- Type:
integer
- name
columnJoins
- This schema defines the type to capture how frequently a column is joined with columns in the other tables.
- Type:
object
- This schema does not accept additional properties.
- Properties
- columnName
- $ref: #/definitions/columnName
- joinedWith
- Fully qualified names of the columns that this column is joined with.
- Type:
array
- Items
- Type:
object
- Properties
- fullyQualifiedName
- joinCount
- Type:
integer
- Type:
- columnName
tableJoins
- This schema defines the type to capture information about how columns in this table are joined with columns in the other tables.
- Type:
object
- This schema does not accept additional properties.
- Properties
- startDate
- Date can be only from today going back to last 29 days.
- $ref: ../../type/basic.json#/definitions/date
- dayCount
- Type:
integer
- Default:
1
- Type:
- columnJoins
- Type:
array
- Items
- $ref: #/definitions/columnJoins
- Type:
- startDate
tableData
- This schema defines the type to capture rows of sample data for a table.
- Type:
object
- This schema does not accept additional properties.
- Properties
- columns
- List of local column names
not fully qualified column names
of the table. - Type:
array
- Items
- $ref: #/definitions/columnName
- List of local column names
- rows
- Data for multiple rows of the table.
- Type:
array
- Items
- Data for a single row of the table within the same order as columns fields.
- Type:
array
- columns