channel
Channel information.
Channel
dataclass
Channel(name, data_type, sample_rate, time=None, publisher=None, partition_id=None)
Metadata associated with a channel.
Channels have the form {domain}:*.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name associated with this channel. |
required |
data_type
|
dtype
|
The data type associated with this channel. |
required |
sample_rate
|
float
|
The sampling rate associated with this channel. |
required |
time
|
int
|
The timestamp when this metadata became active. |
None
|
publisher
|
str
|
The publisher associated with this channel. |
None
|
partition_id
|
str
|
The partition ID associated with this channel. |
None
|
domain
cached
property
domain
The domain associated with this channel.
from_field
classmethod
from_field(field)
Create a Channel from Arrow Flight field metadata.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
field
|
field
|
The channel field containing relevant metadata. |
required |
Returns:
Type | Description |
---|---|
Channel
|
The newly created channel. |
Source code in arrakis/channel.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
|
from_json
classmethod
from_json(payload)
Create a Channel from its JSON representation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
payload
|
bytes
|
The JSON-serialized channel. |
required |
Returns:
Type | Description |
---|---|
Channel
|
The newly created channel. |
Source code in arrakis/channel.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
|
to_json
to_json(time=None)
Serialize channel metadata to JSON.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
time
|
int
|
If specified, the timestamp when this metadata became active. |
None
|
Source code in arrakis/channel.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
|