2021-08-01 14:27:44 -07:00
|
|
|
# generated by datamodel-codegen:
|
|
|
|
# filename: schema/entity/services/databaseService.json
|
2021-08-23 14:59:39 -07:00
|
|
|
# timestamp: 2021-08-23T15:40:00+00:00
|
2021-08-01 14:27:44 -07:00
|
|
|
|
|
|
|
from __future__ import annotations
|
2021-08-17 08:45:46 -07:00
|
|
|
|
2021-08-01 14:27:44 -07:00
|
|
|
from enum import Enum
|
|
|
|
from typing import Optional
|
2021-08-17 08:45:46 -07:00
|
|
|
|
2021-08-01 14:27:44 -07:00
|
|
|
from pydantic import BaseModel, Field, constr
|
2021-08-17 08:45:46 -07:00
|
|
|
|
|
|
|
from ...type import basic, jdbcConnection, schedule
|
2021-08-01 14:27:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
class DatabaseServiceType(Enum):
|
|
|
|
BigQuery = 'BigQuery'
|
|
|
|
MySQL = 'MySQL'
|
|
|
|
Redshift = 'Redshift'
|
|
|
|
Snowflake = 'Snowflake'
|
|
|
|
Postgres = 'Postgres'
|
|
|
|
MSSQL = 'MSSQL'
|
|
|
|
Hive = 'Hive'
|
2021-08-15 11:27:30 +05:30
|
|
|
Oracle = 'Oracle'
|
2021-08-17 08:45:46 -07:00
|
|
|
Athena = 'Athena'
|
|
|
|
Presto = 'Presto'
|
2021-08-01 14:27:44 -07:00
|
|
|
|
|
|
|
|
2021-08-17 08:45:46 -07:00
|
|
|
class DatabaseService(BaseModel):
|
2021-08-01 14:27:44 -07:00
|
|
|
id: basic.Uuid = Field(
|
2021-08-17 08:45:46 -07:00
|
|
|
..., description='Unique identifier of this database service instance.'
|
2021-08-01 14:27:44 -07:00
|
|
|
)
|
|
|
|
name: constr(min_length=1, max_length=64) = Field(
|
2021-08-17 08:45:46 -07:00
|
|
|
..., description='Name that identifies this database service.'
|
|
|
|
)
|
|
|
|
serviceType: DatabaseServiceType = Field(
|
2021-08-01 14:27:44 -07:00
|
|
|
...,
|
2021-08-17 08:45:46 -07:00
|
|
|
description='Type of database service such as MySQL, BigQuery, Snowflake, Redshift, Postgres...',
|
2021-08-01 14:27:44 -07:00
|
|
|
)
|
|
|
|
description: Optional[str] = Field(
|
2021-08-17 08:45:46 -07:00
|
|
|
None, description='Description of a database service instance.'
|
2021-08-01 14:27:44 -07:00
|
|
|
)
|
|
|
|
href: basic.Href = Field(
|
2021-08-17 08:45:46 -07:00
|
|
|
..., description='Link to the resource corresponding to this database service.'
|
|
|
|
)
|
|
|
|
jdbc: jdbcConnection.JdbcInfo = Field(
|
|
|
|
..., description='JDBC connection information'
|
2021-08-01 14:27:44 -07:00
|
|
|
)
|
2021-08-21 17:52:24 -07:00
|
|
|
ingestionSchedule: Optional[schedule.Schedule] = Field(
|
|
|
|
None, description='Schedule for running metadata ingestion jobs.'
|
|
|
|
)
|