QPR ProcessAnalyzer Objects in Expression Language

From QPR ProcessAnalyzer Wiki
Revision as of 15:45, 17 December 2019 by Ollvihe (talk | contribs) (→‎DataFrame)
Jump to navigation Jump to search

DataFrame

DataFrame properties Description
Columns (String*) DataFrame columns names as an array in the order the columns are in the DataFrame.
Rows Returns the data content of the DataFrame as a two-dimensional array (matrix). The column names are not part of the data content.

Examples:

DatatableById(5).DataFrame.Rows[0][0]
Returns: the cell value in the first row and first column in a datatable with id 5.
<column label>

Returns an array of values of given column.

Examples: ToDataFrame([[0, "zero"], [2, "two"], [3, "three"]], ["id", "right"]).id Returns: [0, 2, 3]

ToDataFrame([[0, "zero"], [2, "two"], [3, "three"]], ["id", "right"]).right Returns: [zero, two, three]


DataFrame functions Parameters Description
Append

1. Create a new DataFrame that has the contents of given DataFrame appended into the end of this DataFrame. 2. Parameters: 2.1. other: DataFrame to be added into the end of this DataFrame. 3. Returns a new DataFrame that has the rows from both the DataFrames so that the rows from the other DataFrame are appended to the end of the this DataFrame. 3.1. If the number of columns is different between this DataFrame and the other DataFrame, an exception is thrown.

Examples: ToDataFrame([[0, "zero"], [2, "two"], [3, "three"]], ["id", "text"]).Append(

 ToDataFrame([[1, "one"], [4, "four"]], ["id", "text"])

);

Returns string: id;text 0;zero 2;two 3;three 1;one 4;four

ColumnIndexes

1. Convert column names into column indexes. 2. Parameters: 2.1. columnNames: An array of column names. 3. Returns ids for all the column names. 3.1. If any column name was not found, an exceptionis thrown.

Examples: ToDataFrame([[0, "zero"], [2, "two"], [3, "three"]], ["id", "right"]).ColumnIndexes(["right", "id"]) Returns: [1, 0]

Column

1. Returns an array of values of given column. 2. Parameters: 2.1. column: Column index or column label. 3. Returns column values as an array in the same order as they are in the DataFrame.

Examples: ToDataFrame([[0, "zero"], [2, "two"], [3, "three"]], ["id", "right"]).Column("id") Returns: [0, 2, 3]

ToDataFrame([[0, "zero"], [2, "two"], [3, "three"]], ["id", "right"]).Column("right") Returns: [zero, two, three]

Columns

1. Create a new DataFrame having only a subset of columns of this DataFrame. 2. Parameters: 2.1. columnIndexes: An array of column indexes or column labels. 3. Returns a new DataFrame that has only the given columns.

Examples: ToDataFrame([[0, "zero"], [2, "two"], [3, "three"]], ["id", "right"]).Columns([1]).ToCsv() Returns string: right zero two three

ToDataFrame([[0, "zero"], [2, "two"], [3, "three"]], ["id", "right"]).Columns([]).ToCsv() Returns: empty string

Head

1. Create a new DataFrame having only top n rows of this DataFrame. 2. Parameters: 2.1. numRows: Number of rows to take. 3. Returns a new DataFrame that has only the given top n rows of the original context DataFrame. 3.1. If the DataFrame has less than n rows, all its rows are returned.

Examples: ToDataFrame([[0, "zero"], [2, "two"], [3, "three"]], ["id", "right"]).Head(2).ToCsv() Results string: id;right 0;zero 2;two

ToDataFrame([[0, "zero"], [2, "two"], [3, "three"]], ["id", "right"]).Head(10).ToCsv() Results string: id;right 0;zero 2;two 3;three

Join

1. Performs Join operation between two DataFrames by given columns. 2. Parameters: 2.1. other: Other DataFrame to join this DataFrame with. 2.2. keys: Identifies columns to be matched with each other. Value can be either: 2.2.1. Single column index (numerical) or name. 2.2.1.1. In this case, the column identified with this value is used in both the DataFrames to match the rows. 2.2.2. An array of any number of: 2.2.2.1. Column identifiers or names 2.2.2.1.1. In this case, the column identified with this value is used in both the DataFrames to match the rows. 2.2.2.2. Hierarchical arrays (#29290#) containing identifiers or names both in their context object and value object. 2.2.2.1.1. In this case, the column identified with the context value is used to identify the column in this DataFrame, whereas the column identified with the value of the context is used to identify the column in the other DataFrame to match the rows. 2.3. joinType: Optional parameter defining the join type. Supported values are: 2.3.1. "Inner": 2.3.1.1. Inner join (row is generated only if both context and other have the key value. 2.3.1.2. This is the default value. 2.3.2. "LeftOuter": 2.3.1.1. Left outer join (at least one row is generated for each context row, even if there is no matching other row, in which case null is given as value for the other columns) 3. Returns a new DataFrame that the result of the join operation. Note that the key-column of the other -DataFrame is not included.

Examples: Let("left", ToDataFrame([[0, "zero"], [1, "one"]], ["id", "left"])); Let("right", ToDataFrame([[0, "zero"], [2, "two"], [3, "three"]], ["id", "right"])); left.join(right, "id", "inner").ToCsv() Returns string: id;left;right 0;zero;zero

Let("left", ToDataFrame([[0, "zero"], [1, "one"]], ["id", "left"])); Let("right", ToDataFrame([[0, "zero"], [2, "two"], [3, "three"]], ["id", "right"])); left.join(right, "id", "leftouter").ToCsv() Returns string: id;left;right 0;zero;zero 1;one;

Let("left", ToDataFrame([[0, 0, "zerozeroleft"], [0, 1, "zeroleft"], [1, 2, "oneleft"]], ["idleft1", "idleft2", "left"])); Let("right", ToDataFrame([[0, 0, "zerozeroright"], [0, 1, "zeroright"], [2, 3, "tworight"], [3, 4, "threeright"]], ["idright1", "idright2", "right"])); left.join(right, ["idleft1": "idright1"], "inner");

Returns string: idleft1;idleft2;left;idright2;right 0;0;zerozeroleft;0;zerozeroright 0;0;zerozeroleft;1;zeroright 0;1;zeroleft;0;zerozeroright 0;1;zeroleft;1;zeroright

Let(""left"", ToDataFrame([[0, 0, ""zerozeroleft""], [0, 1, ""zeroleft""], [1, 2, ""oneleft""]], [""idleft1"", ""idleft2"", ""left""])); Let(""right"", ToDataFrame([[0, 0, ""zerozeroright""], [0, 1, ""zeroright""], [2, 3, ""tworight""], [3, 4, ""threeright""]], [""idright1"", ""idright2"", ""right""])); left.join(right, [""idleft1"": ""idright1"", ""idleft2"": ""idright2""], ""inner""); Returns string: idleft1;idleft2;left;right 0;0;zerozeroleft;zerozeroright 0;1;zeroleft;zeroright

GroupBy

1. Create a new DataFrame based on the current DataFrame having rows grouped by given columns and values aggregated using given functions. 2. Parameters: 2.1. columns: Columns to group the rows by identified by column indexes or column labels. 2.2. aggregationExpressions: A hierarchical array (#29290#) containing the name of the column as context object and the value as context value. The value can be either: 2.2.1. Expression object (#29355#), in which case the expression is evaluated in the context of each row in the DataFrame. 2.2.2. Otherwise the value is expected to be a constant value that is assigned as the value for all the rows. 3. Returns a new DataFrame whose rows are grouped by given keys and for group, given expressions are calculated separately. One row in the end result correspond with one group.

Examples: ToDataFrame([[0, "zero"], [0, "zero2"], [2, "two"], [2, "two"], [2, "two3"], [3, "three"]], ["id", "text"]).GroupBy(["id"], [

 "ids": Def("", Sum(id)),
 "texts": Def("", StringJoin(",", text)),
 "constant": 123

]).ToCsv() Returns string: ids;texts;constant 0;zero,zero2;123 6;two,two,two3;123 3;three;123

ToDataFrame([[0, "zero"], [0, "zero2"], [2, "two"], [2, "two"], [2, "two3"], [3, "three"]], ["id", "text"]).GroupBy(["id", "text"], [

 "ids": Def("", Sum(id)),
 "texts": Def("", StringJoin(",", text)),
 "constant": 123

]).ToCsv() Returns string: ids;texts;constant 0;zero;123 0;zero2;123 4;two,two;123 2;two3;123 3;three;123

Analysis("OperationLog") .GroupBy(

 ["User Name"],
 [
   "User Name": Def("", Column("User Name")[0]),
   "Count": Def("Rows", CountTop(Rows)),
   "Avg. Duration": Def("", Average(Duration)),
   "Max. Duration": Def("", Max(Duration))
 ]

).ToCsv()

Returns string (similar to this): User Name;Count;Avg. Duration;Max. Duration

207;0.617434782608696;20.556

Administrator;665;16.3750631578947;4225.497 qpr;128;2.158765625;20.346

Analysis("OperationLog").OrderBy(Duration).Head(1) Results string: id;right 0;zero 2;two 3;three

Merge

1. Create a new DataFrame that has the contents of given (target) DataFrame merged with another (source) DataFrame using method described in parameters. 1.1. Principles somewhat follow how MERGE SQL command works in SQL Server. 1.2. In order for the merge to work properly, both the source and target table should have exactly the same columns in exactly the same order. 2. Parameters: 2.1. source: DataFrame to be merged with this (target) DataFrame. 2.2. matchColumns: Identifies columns to be matched with each other. Value can be either: 2.2.1. Single column index (numerical) or name. 2.2.1.1. In this case, the column identified with this value is used in both the DataFrames to match the rows. 2.2.2. An array of any number of: 2.2.2.1. Column identifiers or names 2.2.2.1.1. In this case, the column identified with this value is used in both the DataFrames to match the rows. 2.2.2.2. Hierarchical arrays (#29290#) containing identifiers or names both in their context object and value object. 2.2.2.1.1. In this case, the column identified with the context value is used to identify the column in this DataFrame, whereas the column identified with the value of the context is used to identify the column in the other DataFrame to match the rows. 2.3. copyOnMatch: An array similar to the one in 2.2.2 of column names or indexes of columns to copy from the source to target, if a matching row is found. 2.3.1. If the value is _remove (#27680#), then all the rows for which a match was found will be removed from the resulting table. 2.3.2. If the value is null (#27679#), then the target row will be completely replaced with all the columns in the source row that have identical name in both source and target table. 2.3.3. The default value is null. 2.3. copyIfNotMatchedInTarget: An array similar to the one in 2.3 of column names or indexes of columns to copy from the source to target, if a matching row is not found. 2.4. addIfNotMatchedInTarget: A boolean value that defines whether the source row is added to the result if there is no matching row in the target DataFrame. 2.4.1. The default value is true. 2.5. keepIfNotMatchedBySource: A boolean value that defines whether the target row is added to the result if there is no matching row in the source DataFrame. 2.5.1. The default value is true. 3. Returns a new DataFrame that has the combination of rows from both the DataFrames. 3.1. If the number of columns is different between this DataFrame and the other DataFrame, an exception is thrown.

Examples: Let("target", ToDataFrame([[0, "zero", "target"], [1, "", "target"]], ["id", "text", "frame"])); Let("source", ToDataFrame([[1, "one", "source"], [2, "two", "source"], [3, "three", "source"]], ["id", "text", "frame"]));

target.Merge(source, "id").ToCsv()

Returns string (one key, default parameters, identical dataframe columns): id;text;frame 0;zero;target 1;one;source 2;two;source 3;three;source

target.Merge(source, "id", ["text"]).ToCsv()

Returns string (one key, default parameters, identical dataframe columns, copy only text column from source): id;text;frame 0;zero;target 1;one;target 2;two; 3;three;

target.Merge(source, "id", ["text"], _remove).ToCsv()

Returns string (one key, default parameters, identical dataframe columns, copy only text column from source, remove rows found only in source): id;text;frame 0;zero;target 1;one;target

target.Merge(source, "id", ["text"], _remove, false).ToCsv()

Returns string (one key, identical dataframe columns, copy only text column from source, remove rows found only in source or only in target): id;text;frame 1;one;target

target.Merge(source, "id", _remove, _remove, false).ToCsv()

Returns string (one key, identical dataframe columns, remove all rows): id;text;frame

Let("target", ToDataFrame([[0, 0, "zerozeroleft", "target"], [0, 1, "zeroleft", "target"], [1, 2, "left", "target"], [4, 5, "fourleft", "target"]], ["idleft1", "idleft2", "textleft", "frame"])); Let("source", ToDataFrame([[0, 0, "zerozeroright", "source"], [0, 1, "zeroright", "target"], [1, 2, "oneright", "source"], [2, 3, "tworight", "source"], [3, 4, "threeright", "source"]], ["idright1", "idright2", "textright", "frame"])); target.Merge(source, ["idleft1": "idright1"]).ToCsv()

Returns string (one key, default parameters, different dataframe columns, copy all matching columns): idleft1;idleft2;textleft;frame 0;0;zerozeroleft;source 0;0;zerozeroleft;target 0;1;zeroleft;source 0;1;zeroleft;target 1;2;left;source 4;5;fourleft;target 2;;;source 3;;;source

target.Merge(source, ["idleft1": "idright1"], []).ToCsv()

Returns string (one key, default parameters, different dataframe columns, copy only key column): idleft1;idleft2;textleft;frame 0;0;zerozeroleft;target 0;0;zerozeroleft;target 0;1;zeroleft;target 0;1;zeroleft;target 1;2;left;target 4;5;fourleft;target 2;;; 3;;;

target.Merge(source, ["idleft1": "idright1", "idleft2": "idright2"]).ToCsv()

Returns string (two keys, default parameters, different dataframe columns, copy all matching columns): idleft1;idleft2;textleft;frame 0;0;zerozeroleft;source 0;1;zeroleft;target 1;2;left;source 4;5;fourleft;target 2;3;;source 3;4;;source

target.Merge(source, ["idleft1": "idright1", "idleft2": "idright2"], ["textleft": "textright"]).ToCsv()

Returns string (two keys, default parameters, different dataframe columns, copy only textright -column): idleft1;idleft2;textleft;frame 0;0;zerozeroright;target 0;1;zeroright;target 1;2;oneright;target 4;5;fourleft;target 2;3;tworight; 3;4;threeright;

target.Merge(source, ["idleft1": "idright1", "idleft2": "idright2"], ["textleft": "textright", "frame"]).ToCsv()

Returns string (two keys, default parameters, different dataframe columns, copy textright and frame -columns): idleft1;idleft2;textleft;frame 0;0;zerozeroright;source 0;1;zeroright;target 1;2;oneright;source 4;5;fourleft;target 2;3;tworight;source 3;4;threeright;source

target.Merge(source, ["idleft1": "idright1", "idleft2": "idright2"], _remove).ToCsv()

Returns string (two keys, default parameters, different dataframe columns, remove all matching rows, copy only matching columns): idleft1;idleft2;textleft;frame 4;5;fourleft;target 2;3;; 3;4;;

target.Merge(source, ["idleft1": "idright1", "idleft2": "idright2"], ["textleft": "textright"], ["idleft1": "idright1", "idleft2": "idright2", "textleft": "textright"]).ToCsv()

Returns string (two keys, default parameters, different dataframe columns, copy only textright-column for matching columns, copy id columns and textright-column for rows not found in target): idleft1;idleft2;textleft;frame 0;0;zerozeroright;target 0;1;zeroright;target 1;2;oneright;target 4;5;fourleft;target 2;3;tworight; 3;4;threeright;

target.Merge(source, ["idleft1": "idright1", "idleft2": "idright2"], ["textleft": "textright"], ["idleft1": "idright1", "idleft2": "idright2", "textleft": "textright", "frame"]).ToCsv()

Returns string (two keys, default parameters, different dataframe columns, copy only textright-column for matching columns, copy id, frame and textright-column for rows not found in target): idleft1;idleft2;textleft;frame 0;0;zerozeroright;target 0;1;zeroright;target 1;2;oneright;target 4;5;fourleft;target 2;3;tworight;source 3;4;threeright;source

target.Merge(source, ["idleft1": "idright1", "idleft2": "idright2"], null, ["idleft1": "idright1", "idleft2": "idright2", "textleft": "textright"]).ToCsv()

Returns string (two keys, default parameters, different dataframe columns, don't copy any columns from source for matching columns, copy id columns and textright-column for rows not found in target): idleft1;idleft2;textleft;frame 0;0;zerozeroleft;source 0;1;zeroleft;target 1;2;left;source 4;5;fourleft;target 2;3;tworight; 3;4;threeright;

target.Merge(source, ["idleft1": "idright1", "idleft2": "idright2"], ["textleft": "textright"], ["idleft1": "idright1", "idleft2": "idright2", "textleft": "textright", "frame"], false).ToCsv()

Returns string (two keys, default parameters, different dataframe columns, copy only textright-column for matching columns, copy id, frame and textright-column for rows not found in target, remove all rows not found in source): idleft1;idleft2;textleft;frame 0;0;zerozeroright;target 0;1;zeroright;target 1;2;oneright;target 2;3;tworight;source 3;4;threeright;source

OrderBy

1. Create a new DataFrame having rows ordered using the values returned by given expression evaluated on each row. 2. Parameters: 2.1. expression: Ordering expression to use. 3. Returns a new DataFrame whose rows are ordered in ascending fashion based on the results of evaluating given expression for each row.

Examples: ToDataFrame([[0, "zero"], [2, "two"], [3, "three"]], ["id", "text"]).OrderBy(text).ToCsv() Returns string: id;right 3;three 2;two 0;zero

Analysis("OperationLog").OrderBy(Duration).Head(1) Results string: id;right 0;zero 2;two 3;three

OrderByDescending

1. Create a new DataFrame having rows ordered using the values returned by given expression evaluated on each row. 2. Parameters: 2.1. expression: Ordering expression to use. 3. Returns a new DataFrame whose rows are ordered in descending fashion based on the results of evaluating given expression for each row.

Examples: ToDataFrame([[0, "zero"], [2, "two"], [3, "three"]], ["id", "text"]).OrderByDescending(text).ToCsv() Returns string: id;right 0;zero 2;two 3;three

Analysis("OperationLog").OrderByDescending(Duration).Head(1) Returns a DataFrame having one row that contains the longest operation found in the operation log analysis.

Persist

1. Persists the DataFrame into database as DataTable (#63863#) under given name. 1.1. If the DataTable with that name does not exist in the project previously, a new DataTable is created. 1.2. If the DataTable with that name already exists, the DataFrame will be stored into that table. 2. Parameters: 2.1. dataTableName: Name of the data table to use for storing the value. 2.2. parameters: Additional parameters for the persist operation #34201#. Supported parameters: 2.2.1. Append: 2.2.1.1. Can be used to determine whether to append (=true/1) or overwrite (=false, default) the existing data. 2.2.2. ProjectName: 2.2.2.1. Name of the project under which the DataTable is to be created. 2.2.3. ProjectId: 2.2.3.1. Id of the project under which the DataTable is to be created. 3. Returns DataTable object containing the persisted DataFrame.

Examples: Let("right", ToDataFrame([[0, "zero"], [2, "two"], [3, "three"]], ["id", "right"])); right.Persist("RightDataTable", ["ProjectName": "TestData"]) Results: Id of the new data table named "RightDataTable" created into project named TestData (which is created if it doesn't already exist). If the table already existed, its contents will be overwritten by the new content.

Let("newData", ToDataFrame(4, "four", ["id", "right"])); newData.Persist("RightDataTable", ["ProjectName": "TestData", "Append": true]) Results: Id of the new data table named "RightDataTable" created into project named TestData (which is created if it doesn't already exist). If the table already existed, new content will be appended into the end of the table.

SetColumns

1. Create a new DataFrame having contents of this DataFrame and create a new columns and/or modify existing columns of the resulting DataFrame. 2. Parameters: 2.1. columnChanges: Name of the new column. 2.1.1. Hierarchical array (#29290#) containing the name of the column as context object and the value as context value. The value can be either: 2.1.1.1. Expression object (#29355#), in which case the expression is evaluated in the context of each row in the DataFrame. 2.1.1.2. Otherwise the value is expected to be a constant value that is assigned as the value for all the rows. 3. Returns a new DataFrame that is the copy of the original DataFrame with the following modifications: 3.1. For all the elements in the columnChanges -array: 3.1.1. If column name identifies a column that already exists, then the values in that column will be replaced with newly calculated values using the value. 3.1.2. The original column values can be used in the valueExpression, including those that were listed earlier in the list of column changes.

Examples: ToDataFrame([[0, "zero"], [2, "two"], [3, "three"]], ["id", "text"]).SetColumns(["both": Def("", text + "=" + id)]).ToCsv() Result string: id;text;both 0;zero;zero=0 2;two;two=2 3;three;three=3

ToDataFrame([[0, "zero"], [2, "two"], [3, "three"]], ["id", "text"]).SetColumns(["text": Def("", text + "=" + id)]).ToCsv() Result string: id;text 0;zero=0 2;two=2 3;three=3

ToDataFrame([[0, "zero"], [2, "two"], [3, "three"]], ["id", "text"]).SetColumns(["both": Def("", text + "=" + id), "both+1": Def("", both + 1), "text": Def("", "Done: " + Column("both+1")), "constant": 1234]).ToCsv() Result string: id;text;both;both+1;constant 0;Done: zero=01;zero=0;zero=01;1234 2;Done: two=21;two=2;two=21;1234 3;Done: three=31;three=3;three=31;1234

Tail

1. Create a new DataFrame having only bottom n rows of this DataFrame. 2. Parameters: 2.1. numRows: Number of rows to take. 3. Returns a new DataFrame that has only the given bottom n rows of the original context DataFrame. 3.1. If the DataFrame has less than n rows, all its rows are returned.

Examples: ToDataFrame([[0, "zero"], [2, "two"], [3, "three"]], ["id", "right"]).Tail(2).ToCsv() Results string: id;right 2;two 3;three

ToDataFrame([[0, "zero"], [2, "two"], [3, "three"]], ["id", "right"]).Tail(10).ToCsv() Results string: id;right 0;zero 2;two 3;three

ToCsv

1. Converts the context DataFrame into a CSV file. 1.1. Uses the export format described in #10663#. 2. Parameters: 2.1. Does not support any parameters. 3. Returns a string containing the contents of the DataFrame as string.

Examples: ToDataFrame([[0, "zero"], [2, "two"], [3, "three"]], ["id", "right"]).ToCsv() Returns string: id;right 0;zero 2;two 3;three

Where

1. Create a new DataFrame having only rows for which given expression returns true. 1.1. Overrides Where-function defined in the generic context #27644#. Create a new DataFrame having only top n rows of this DataFrame. 2. Parameters: 2.1. condition: Condition expression to evaluate for each DataFrame row separately. 3. Returns a new DataFrame that has only the rows that evaluate to true when the condition expression is evaluated for the row. 3.1. DataFrame's inherited functionalities (#63899#) can be used in the condition expression.

Examples: Let("df", ToDataFrame([[0, "zero", 1], [2, "two", true], [3, "three", Now]], ["id", "string", "variant values"]));

All the following expression return exactly the same: df.Where(id < 3); df.Where(Column("id") < 3); df.Where(_[0] < 3);

Returns string: id;string;variant values 0;zero;1 2;two;True


Analysis("OperationLog").Where(Duration > 10.0) Returns a DataFrame containing all the OperationLog analysis rows where the value of Duration column is greater than 10.

Zip

1. Create a new DataFrame that has the contents of given DataFrame appended as new columns into the end of this DataFrame. 2. Parameters: 2.1. other: DataFrame to be added as new columns into the end of this DataFrame. 3. Returns a new DataFrame that has the colums from both the data frames so that the columns from the other DataFrame are appended to the end of the columns of this DataFrame. 3.1. If the number of rows is different between this DataFrame and the other DataFrame, an exception is thrown. 3.2. All the column names should be unique between both the DataFrames. If they aren't, an exception is thrown.

Examples: Let("df1", ToDataFrame([[0, "zero"], [1, "one"], [4, "four"]], ["id", "text"])); Let("df2", ToDataFrame([[1, "one"], [2, "two"], [3, "three"]], ["id2", "text2"])); df1.Zip(df2).ToCsv(); Returns string: id;text;id2;text2 0;zero;1;one 1;one;2;two 4;four;3;three

Datatable

Datatable properties Description
CreatedDate (DateTime) Timestamp when the datatable was created.
DataFrame (DataFrame) Contents of the DataTable as a DataFrame.
Description (String) Datatable description. The datatable description may contain line breaks.
Id (Integer) Datatable Id. Datatable Id is generated by QPR ProcessAnalyzer when the datatable is created.
LastImportDate (DateTime) Timestamp when data was the last time imported to the datatable.
LastModifiedDate (DateTime) Timestamp when the datatable was modified the last time.
Name (String) Name of the datatable.
NColumns (Integer) Number of columns in the datatable.
NRows (Integer) Number of data rows in the datatable.
Project (Project) Project the datatable belongs to.

Model

Model properties Description
CaseAttributes (AttributeType*) CaseAttributes in the model returned in the alphabetical order. Using this property requires that the model is loaded in the memory. If the model is not in the memory, it's loaded when this property is used.
ConfigurationJson (String) Returns an model configuration in JSON format.
CreatedDate (DateTime) Timestamp when the model was created.
DefaultFilterId (Integer) Default filter id of the model.
ConfigurationJson (String) Returns an model configuration in JSON format.
Description (String) Model description. The model description may contain line breaks.
EstimatedMemory (Integer) Returns an estimation of how much memory in bytes the model requires.
EventAttributes (AttributeType*) EventAttributes in the model returned in the alphabetical order. Using this property requires that the model is loaded in the memory. If the model is not in the memory, it's loaded when this property is used.
EventLog (EventLog) Model EventLog containing all events in the model, i.e. no filters have been applied. Using this property requires that the model is loaded in the memory. If the model is not in the memory, it's loaded when this property is used.
Id (Integer) Model Id. Model Id is generated by QPR ProcessAnalyzer when the model is created.
LastImportDate (DateTime) Timestamp when data was the last time imported to the model.
LastModifiedDate (DateTime) Timestamp when the model was modified the last time.
Name (String) Model name.
NBookmarks (Integer) Number of bookmarks in the model.
NCache (Integer) Amount of objects related to the model when the model is loaded into the memory.
NCaseAttributes (Integer) Number of CaseAttributes in model.
NCases (Integer) Number of Cases in the model.
NEventAttributes (Integer) Number of EventAttributes in model.
NEvents (Integer) Number of Events in model.
NEventTypes (Integer) Number of EventTypes in the model.
NFilters (Integer) Number of filters in the model.
NOpens (Integer) Number of times analysis has been requested from the model.
Project (Project) Project the model belongs to.
ProjectId (Integer) Project id the model belongs to.
Status (String)

Memory availability status of the model. There are the following statuses:

  • Loading: The model is currently loading into the memory. When the loading is ready, the status changes to online. If the loading fails, the status changes to offline.
  • Offline: The model is currently not loaded into the memory. The model needs to be loaded into the memory, so that analyses can be calculated from the model (occurs automatically when an analysis is requested).
  • Online: The model is in the memory and ready for analysis calculation. If the model is dropped from the memory, its status changes to offline.

Notes:

  • Regarding properties returning object counts: For models downloaded from a datatable, ODBC or expression datasource, the numbers represent the situation in the previous data load. Null is returned for models downloaded from an ODBC datasource, if the model has never been loaded into the memory. Note also that if Case permissions are used for the model, null is returned for data security reasons.
  • Using CaseAttributes, EventAttributes or Eventlog properties of the Model object requires the model to be loaded into the memory. If the model is not in the memory, it's loaded when these properties is called. Other Model object properties down require the model to be in the memory.

Project

Project properties Description
Id (Integer) Id of the Project. It's generated by QPR ProcessAnalyzer when the model is loaded.
Name (String) Name of the Project.
Models (Model*) Models that are in the Project.

User/Group

User objects represents users and user groups. Note that some properties can only be used for users and some for groups.

User properties Description
Description (String) Description of the user.
Email (String) Email address of the user.
FullName (String) Full name of the user or group name.
GroupMemberNames (String*) Array of names of members of a user group. This property is available for groups.
GroupMembers (User*) Array of members of a user group. This property is available for groups.
GroupNames (String*) Array of names of user groups the user belongs to. This property is available for users.
Groups (User*) Array of user groups the user belongs to. This property is available for users.
Id (Integer) Id of the user, which is unique for every user.
IsActive (Boolean) Returns true only if the user is active (not disabled).
IsGroup (Boolean) Returns true if the user is a user group.
LogonMessage (String) Returns the logon message of the user.
Name (String) Login name of the user or group.
Roles (String Array*) Roles of user as string array.