2021-08-11 17:17:55 +00:00

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.

$id: https://github.com/open-metadata/OpenMetadata/blob/main/catalog-rest-service/src/main/resources/json/schema/entity/data/table.json

Type: object

Properties

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:
    1. "Regular"
    2. "External"
    3. "View"
    4. "SecureView"
    5. "MaterializedView"

columnDataType

  • This enum defines the type of data stored in a column.
  • Type: string
  • The value is restricted to the following:
    1. "NUMBER"
    2. "TINYINT"
    3. "SMALLINT"
    4. "INT"
    5. "BIGINT"
    6. "FLOAT"
    7. "DOUBLE"
    8. "DECIMAL"
    9. "NUMERIC"
    10. "TIMESTAMP"
    11. "TIME"
    12. "DATE"
    13. "DATETIME"
    14. "INTERVAL"
    15. "STRING"
    16. "MEDIUMTEXT"
    17. "TEXT"
    18. "CHAR"
    19. "VARCHAR"
    20. "BOOLEAN"
    21. "BINARY"
    22. "VARBINARY"
    23. "ARRAY"
    24. "BLOB"
    25. "LONGBLOB"
    26. "MEDIUMBLOB"
    27. "MAP"
    28. "STRUCT"
    29. "UNION"
    30. "SET"
    31. "GEOGRAPHY"
    32. "ENUM"
    33. "JSON"

columnConstraint

  • This enum defines the type for column constraint.
  • Type: string
  • The value is restricted to the following:
    1. "NULL"
    2. "NOT_NULL"
    3. "UNIQUE"
    4. "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:
        1. "UNIQUE"
        2. "PRIMARY_KEY"
        3. "FOREIGN_KEY"
    • columns
      • List of column names corresponding to the constraint.
      • Type: array
        • Items
        • Type: string

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

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

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

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
    • 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