DataCloudRowCountReadiness

Use this node to validate that an org has a rows in a specific Data 360 object. You can use the result to check for a minimum numbers of rows or that a specific row, like ID, exists.

This task performs a SQL query using the Data 360 Query Connect API. The filter specification follows standard SQL rules. A query filter value can be null to perform null check. Valid null check specifications are:

1{
2    "field": "NumberOfEmployees__c",
3    "operator": "Equal",
4    "value": null
5},
6{
7    "field": "Id__c",
8    "operator": "NotEqual"
9},
10{
11    "field": "Id__c",
12    "operator": "NotEqual",
13    "value": "" //Categorical/Dimensional fields only
14},
15{
16    "field": "Id__c",
17    "operator": "NotEqual",
18    "value": "null" // Categorical/Dimensional fields only
19}

Note

Asset Type Name for Rules 

Not supported

Example Definition in chain.json 

1{
2  "name": "perform_readiness_checks",
3  "label": "Performs Readiness Checks",
4  "dominoVariant": "sfdc_internal__UnifiedAnalyticsDominoVariant",
5  "parameters": {},
6  "definition": {
7    "nodes": {
8      "readiness_check1": {
9        "graphNodeType": {
10          "name": "DataCloudRowCountReadiness"
11        },
12        "parameters": {
13          "name": "RequiredDataCloudRowCountCheck",
14          "object": "${Variables.dataCloudObject}",
15          "filters": [],
16          "valueOnError": -1
17        },
18        "sources": [],
19        "runAs": "CurrentUser"
20      },
21      "readiness_check2": {
22        "graphNodeType": {
23          "name": "DataCloudRowCountReadiness"
24        },
25        "parameters": {
26          "name": "DimensionFieldRowCountCheck",
27          "object": "${Variables.dataCloudObject}",
28          "filters": [
29            {
30              "field": "Id__c",
31              "operator": "${Variables.comparisonOperator1}",
32              "value": "${Variables.dimensionFieldFilterValue}"
33            }
34          ],
35          "condition": "${Readiness.RequiredDataCloudRowCountCheck >= Variables.minRowCount}"
36        },
37        "sources": ["readiness_check1"],
38        "runAs": "CurrentUser"
39      },
40      "readiness_check3": {
41        "graphNodeType": {
42          "name": "DataCloudRowCountReadiness"
43        },
44        "parameters": {
45          "name": "NumericFieldRowCountCheck",
46          "object": "${Variables.dataCloudObject}",
47          "filters": [
48            {
49              "field": "NumberOfEmployees__c",
50              "operator": "${Variables.comparisonOperator2}",
51              "value": 100
52            }
53          ],
54          "condition": "${Variables.runNumericFieldRowCountCheck == true}"
55        },
56        "sources": [],
57        "runAs": "CurrentUser"
58      },
59      "readiness_check4": {
60        "graphNodeType": {
61          "name": "DataCloudRowCountReadiness"
62        },
63        "parameters": {
64          "name": "MultiFilterRowCountCheck",
65          "object": "${Variables.dataCloudObject}",
66          "filters": [
67            {
68              "field": "Id__c",
69              "operator": "Equal",
70              "value": "001RO000004KkxLYAS"
71            },
72            {
73              "field": "NumberOfEmployees__c",
74              "operator": "GreaterThan",
75              "value": 100
76            }
77          ],
78          "condition": "${Variables.runMultiFilterRowCountCheck == true}"
79        },
80        "sources": [],
81        "runAs": "CurrentUser"
82      }
83    }
84  }
85}

Parameters 

ParameterDefinition
name(Required) The name of the readiness check. For example, the result of readiness_check1 is stored as ${Readiness.RequiredDataCloudRowCountCheck}.
object(Required) The Data 360 object API name. The object can be a data model object, a data lake object, a calculated insight, or other.
filters(Optional) A list of filters to further narrow down row count queries.
filters.field(Required) The Data 360 object field API name.
filters.operator(Required) The filter operation. Valid operator values are LessThan, LessThanEqual,GreaterThan, GreaterThanEqual, Equal, NotEqual, In, and NotIn
filters.value(Required) The string or numeric value to filter by based on the type of specified field.
dataspace(Optional) A string data space name to specify if the queried Data 360 object isn’t from the default data space. If not specified, the default data space is used.
condition(Optional) An EL expression, evaluated at runtime, that determines whether to run this readiness check task or not.
valueOnError(Optional) A default integer value for the row count definition in the event of an error or failure.

Set runAs to CurrentUser so that this node runs with the permissions of the user installing the app. If you omit runAs, the node runs as AutoProc, a system user.

Note

App Context Values 

App Context ValueDefinition
Readiness.RequiredChecksA integer value based on the Data 360 query row count result.

On Failure 

Failure handling depends on whether valueOnError is defined:

  • If no valueOnError is defined, the result is passed through as it is. A failed check returns FAIL_TERMINAL and the chain stops.
  • If valueOnError is present and the task succeeded, the result is passed through as it is.
  • If valueOnError is present and the task failed for any reason, the task returns WARN_AND_CONTINUE and passes along the error message. valueOnError is written to the app context so that downstream nodes can continue.

See Also