Skip to content

Refence data types

dve.core_engine.backends.base.reference_data.ReferenceTable

Bases: BaseModel

Configuration for a reference data object when table_name.

Source code in src/dve/core_engine/backends/base/reference_data.py
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
class ReferenceTable(BaseModel, frozen=True):
    """Configuration for a reference data object when table_name."""

    type: Literal["table"]
    """The object type."""
    table_name: str
    """Name of the table where the data persists."""
    database: Optional[str] = None
    """Name of the database where the reference data is located."""

    @property
    def fq_table_name(self):
        """The fully qualified table name"""
        if self.database:
            return f"{self.database}.{self.table_name}"
        return self.table_name

database = None class-attribute instance-attribute

Name of the database where the reference data is located.

fq_table_name property

The fully qualified table name

table_name instance-attribute

Name of the table where the data persists.

type instance-attribute

The object type.

dve.core_engine.backends.base.reference_data.ReferenceFile

Bases: BaseModel

Configuration for a reference data object when a file.

Source code in src/dve/core_engine/backends/base/reference_data.py
54
55
56
57
58
59
60
61
62
63
64
65
class ReferenceFile(BaseModel, frozen=True):
    """Configuration for a reference data object when a file."""

    type: Literal["filename"]
    """The object type."""
    filename: str
    """The path to the reference data relative to the contract."""

    @property
    def file_extension(self) -> str:
        """The file extension of the reference file"""
        return fh.get_file_suffix(self.filename)  # type: ignore

file_extension property

The file extension of the reference file

filename instance-attribute

The path to the reference data relative to the contract.

type instance-attribute

The object type.

dve.core_engine.backends.base.reference_data.ReferenceURI

Bases: BaseModel

Configuration for a reference data object when a URI.

Source code in src/dve/core_engine/backends/base/reference_data.py
68
69
70
71
72
73
74
75
76
77
78
79
class ReferenceURI(BaseModel, frozen=True):
    """Configuration for a reference data object when a URI."""

    type: Literal["uri"]
    """The object type."""
    uri: str
    """The absolute URI of the reference data (as Parquet)."""

    @property
    def file_extension(self) -> str:
        """The file extension of the reference uri"""
        return fh.get_file_suffix(self.uri)  # type: ignore

file_extension property

The file extension of the reference uri

type instance-attribute

The object type.

uri instance-attribute

The absolute URI of the reference data (as Parquet).