Module panama.logging.messages
Functions
def create_message(table_name: str, status: Literal['FINISHED', 'FAILED']) ‑> str
-
Create the message from table and status.
Args
table_name
:str
- name of the table to log.
status (Literal["FINISHED", "FAILED"]): status of the table.
Raises
NameError
- FORBIDDEN NAME for table. Analytics table names cannot end with any value from "_entity", "_application", "_slv".
Returns
str
- message to send to the topic.
def create_servicebus_client() ‑> azure.servicebus._servicebus_client.ServiceBusClient
-
Function used to create a service bus client.
Returns
ServiceBusClient
- client used to send messages.
def get_connection_string_service_bus() ‑> str
-
Function used to recover information for service bus connection from the connections.json file and a keyvault.
Returns
str
- connection string for the servicebus.
def send_message(table_name: str, status: Literal['FINISHED', 'FAILED'], topic_name: str = 'dependency-topic') ‑> None
-
Function used to send messages to the service bus. The service bus used can be found in connections.json file.
Args
table_name
:str
- name of the table to log.
- status (Literal["FINISHED", "FAILED"]): status of the table.
topic_name
:str
, optional- name of the topic where data will be sent. Defaults to "dependency-topic".