Last Updated: caa. 28 Dec 22

Following JSON details the fields that will be sent to both Slacker Manager. The source for the intrabank transactions historical features is retrieved from the following source.

  • Kafka Topic: transactions.transaction-snapshot.snapshot.v1

  • BigQuery Table: PROJECT_ENV.transactions.transactions_transaction_snapshot_snapshot_v1

Current method of retrieving the historical features, is to run an SQL query against the specified BigQuery table and aggregate the historical features as part of this query. A sample of the query execution will return the following table and values.

The keys of the table are:

  • cust_id - senderInfo.customerId

  • beneficiary_acc_id - beneficiaryInfo.customerId

Feature Explanation

1. Time Calculation and Definitions

Historical features are calculated as the difference in the number of hours between now and the expectedDate of transaction. Here one day is defined as 24 hours in the hour_diff variable.

Time is also calculated as a floating window for real-time queries. For instance, last 24 hours will be calculated from the current DATETIME.

DATETIME_DIFF(CURRENT_DATE(), SAFE_CAST(expectedDate as date), HOUR) as hour_diff
  • 360 days: hour_diff <= 360*24

  • 30 days: hour_diff <= 30*24

  • 7 days: hour_diff <= 7*24

  • 1 day: hour_diff <= 1*24

2. Transaction Status

All transaction status calculated for this featurestore has status = "SUCCESS" . All other transaction statuses are filtered out during the SQL query.

Snapshot Transaction Features

transaction_snapshot_history_features

Response Result

Description

feature_id

Feature Type

Type

cust_id

entity_id

customerid

 

UUID

beneficiary_acc_id

The recipient account id

beneficiary_acc_id

 

STRING

category

The category in which the given transaction belongs to

category

STRING

transactionType

The transaction type of the given transaction ID

transactiontype

STRING

direction

Indicates the direction of the transaction

  • DEBIT - Outgoing

  • CREDIT - Incoming

direction

STRING

status

The status of the transaction - E.g. PENDING, SUCCESS, etc.

status

STRING

tx_total_count

Total count of transactions made till date

tx_total_count

INT

unique_tx_days

Total unique number of days, in which a SUCCESSFUL transaction occured

unique_tx_days

INT

tx_count_1d

Total count of transactions made in the last 24 hours

tx_count_1d

INT

tx_sum_1d

Total amount of transactions made in the last 24 hours

tx_sum_1d

FLOAT

tx_avg_1d

Average amount of transactions made in the last 24 hours

tx_avg_1d

FLOAT

tx_count_7d

Total count of transactions made in the last 7 days

tx_count_7d

INT

tx_sum_7d

Total amount of transactions made in the last 7 days

tx_sum_7d

FLOAT

tx_avg_7d

Average amount of transactions made in the last 7 days

tx_avg_7d

FLOAT

tx_count_30d

Total count of transactions made in the last 30 days

tx_count_30d

INT

tx_sum_30d

Total amount of transactions made in the last 30 days

tx_sum_30d

FLOAT

tx_avg_30d

Average amount of transactions made in the last 30 days

tx_avg_30d

FLOAT

tx_count_360d

Total count of transactions made in the last 360 days

tx_count_360d

INT

tx_sum_360d

Total amount of transactions made in the last 360 days

tx_sum_360d

FLOAT

tx_avg_360d

Total amount of transactions made in the last 360 days

tx_avg_360d

FLOAT

tx_sum_last5_out

Total amount of the last 5 outgoing transactions

tx_sum_last5_out

FLOAT

tx_avg_last5_out

Average amount of the last 5 outgoing transactions

tx_avg_last5_out

FLOAT

tx_days_since_last

Number of days since the last transaction was made

tx_days_since_last

INT