Search code examples
wso2-streaming-integrator

Kibana - The indices which match this index pattern don't contain any time fields


This is my definition:

@Store(type="elasticsearch", hostname="localhost", username="elastic", password="changeme", port='9200', index.name = 'frauds', index.type='_doc') 
define table FraudIndex (timestamp long, creditCardNo string, suspiciousTrader string, amount double, currency string);

This is my query:

@info(name='SuspiciousTradeES')
from TradeStream as t join FraudTable as f
    on t.creditCardNo == f.creditCardNo
select eventTimestamp() as timestamp, t.creditCardNo, t.trader as suspiciousTrader, t.amount as amount, t.currency as currency
insert into FraudIndex;

Unfortunately Kibana cannot identify and time fields since its a 'number'.

How am I supposed to end up with possible timestamps?

EDIT: May I also add a question how I could use maps and geo_point type from WSO2SI?


Solution

  • Prepared my mappings manually and it worked.

    {    
        "properties": {
            "timestamp": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
            },
            "creditCardNo": {
                "type": "keyword"
            },
            "suspiciousTrader": {
                "type": "keyword"
            },
            "coordinates": {
                "type": "geo_point"
            },
            "amount": {
                "type": "double"
            },
            "currency": {
                "type": "keyword"
            }
        }
    }