diff --git a/dist/python_tabular-0.0.50-py3-none-any.whl b/dist/python_tabular-0.0.50-py3-none-any.whl index 4af2412..e52d41b 100644 Binary files a/dist/python_tabular-0.0.50-py3-none-any.whl and b/dist/python_tabular-0.0.50-py3-none-any.whl differ diff --git a/dist/python_tabular-0.0.50.tar.gz b/dist/python_tabular-0.0.50.tar.gz index f18b91c..5329af2 100644 Binary files a/dist/python_tabular-0.0.50.tar.gz and b/dist/python_tabular-0.0.50.tar.gz differ diff --git a/docs/Traces.md b/docs/Traces.md index 023dc35..a780792 100644 --- a/docs/Traces.md +++ b/docs/Traces.md @@ -11,6 +11,18 @@ Base_Trace( ``` +--- +Generates Trace to be run on Server. This is the base class to customize the type of Trace you are looking for. +[Server Traces](https://docs.microsoft.com/en-us/dotnet/api/microsoft.analysisservices.tabular.server.traces?view=analysisservices-dotnet#microsoft-analysisservices-tabular-server-traces) + + +**Args** + +* **Tabular_Class** (Tabular) : Tabular Class to retrieve the connected Server and Model. +* **Trace_Events** (List[TraceEvent]) : List of Trace Events that you wish to track. [TraceEventClass](https://docs.microsoft.com/en-us/dotnet/api/microsoft.analysisservices.traceeventclass?view=analysisservices-dotnet) +* **Trace_Event_Columns** (List[TraceColumn]) : List of Trace Event Columns you with to track. [TraceEventColumn](https://docs.microsoft.com/en-us/dotnet/api/microsoft.analysisservices.tracecolumn?view=analysisservices-dotnet) +* **Handler** (Callable) : Function to call when Trace returns response. Input needs to be two arguments. One is source (Which is currently None... Need to investigate why). Second is [TraceEventArgs](https://docs.microsoft.com/en-us/dotnet/api/microsoft.analysisservices.traceeventargs?view=analysisservices-dotnet) + **Methods:** diff --git a/pytabular/tabular_tracing.py b/pytabular/tabular_tracing.py index 5113846..0d7b461 100644 --- a/pytabular/tabular_tracing.py +++ b/pytabular/tabular_tracing.py @@ -8,16 +8,16 @@ class Base_Trace: + '''Generates Trace to be run on Server. This is the base class to customize the type of Trace you are looking for. + [Server Traces](https://docs.microsoft.com/en-us/dotnet/api/microsoft.analysisservices.tabular.server.traces?view=analysisservices-dotnet#microsoft-analysisservices-tabular-server-traces) + + Args: + Tabular_Class (Tabular): Tabular Class to retrieve the connected Server and Model. + Trace_Events (List[TraceEvent]): List of Trace Events that you wish to track. [TraceEventClass](https://docs.microsoft.com/en-us/dotnet/api/microsoft.analysisservices.traceeventclass?view=analysisservices-dotnet) + Trace_Event_Columns (List[TraceColumn]): List of Trace Event Columns you with to track. [TraceEventColumn](https://docs.microsoft.com/en-us/dotnet/api/microsoft.analysisservices.tracecolumn?view=analysisservices-dotnet) + Handler (Callable): Function to call when Trace returns response. Input needs to be two arguments. One is source (Which is currently None... Need to investigate why). Second is [TraceEventArgs](https://docs.microsoft.com/en-us/dotnet/api/microsoft.analysisservices.traceeventargs?view=analysisservices-dotnet) + ''' def __init__(self, Tabular_Class, Trace_Events:List[TraceEvent], Trace_Event_Columns:List[TraceColumn], Handler:Callable) -> None: - '''Generates Trace to be run on Server. This is the base class to customize the type of Trace you are looking for. - [Server Traces](https://docs.microsoft.com/en-us/dotnet/api/microsoft.analysisservices.tabular.server.traces?view=analysisservices-dotnet#microsoft-analysisservices-tabular-server-traces) - - Args: - Tabular_Class (Tabular): Tabular Class to retrieve the connected Server and Model. - Trace_Events (List[TraceEvent]): List of Trace Events that you wish to track. [TraceEventClass](https://docs.microsoft.com/en-us/dotnet/api/microsoft.analysisservices.traceeventclass?view=analysisservices-dotnet) - Trace_Event_Columns (List[TraceColumn]): List of Trace Event Columns you with to track. [TraceEventColumn](https://docs.microsoft.com/en-us/dotnet/api/microsoft.analysisservices.tracecolumn?view=analysisservices-dotnet) - Handler (Callable): Function to call when Trace returns response. Input needs to be two arguments. One is source (Which is currently None... Need to investigate why). Second is [TraceEventArgs](https://docs.microsoft.com/en-us/dotnet/api/microsoft.analysisservices.traceeventargs?view=analysisservices-dotnet) - ''' logging.debug(f'Trace Base Class initializing...') self.Name = 'PyTabular_'+''.join(random.SystemRandom().choices([str(x) for x in [y for y in range(0,10)]], k=10)) self.ID = self.Name.replace('PyTabular_', '')