{
  "name": "IS Analytics Session Messages",
  "id": "IsAnalyticsSessionMessages",
  "thumbnailURL": "",
  "configs": {
    "pubsub": {
      "types": [
        "subscriber"
      ]
    },
    "providerConfig": {
      "configs": {
        "type": "SiddhiStoreDataProvider",
        "config": {
          "siddhiApp": "@store(type='rdbms', datasource='IS_ANALYTICS_DB') @primaryKey('meta_tenantId', 'sessionId') @Index('username','userstoreDomain','tenantDomain') define table SessionInformationTable ( meta_tenantId int, sessionId string, startTime string, terminateTime string, endTime string, duration long, isActive bool, username string, userstoreDomain string, remoteIp string, region string, tenantDomain string, serviceProvider string, identityProviders string, rememberMeFlag bool, userAgent string, userStore string, currentTime string, startTimestamp long, renewTimestamp long, terminationTimestamp long, endTimestamp long, timestamp long);",
          "queryData": {
            "query": "from SessionInformationTable select username, startTime, terminateTime, ifThenElse(endTime == 'January 01, 1970 05:29:59 AM IST', 'Live', endTime) as endTime, duration, ifThenElse(isActive, 'True', 'False') as isActive, userstoreDomain, tenantDomain, remoteIp, ifThenElse(rememberMeFlag, 'True', 'False') as rememberMeFlag, currentTime  having timestamp >= {{from}}L AND timestamp <= {{to}}L order by sessionId"
          },
          "publishingInterval": 100
        }
      }
    }
  }
}
