Skip to content

Commit 73adf51

Browse files
committed
added a data contract for features for ai model retraining
1 parent b4804ef commit 73adf51

18 files changed

+9959
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.codedstreams</groupId>
55
<artifactId>codedx-transaction-fraud-library</artifactId>
6-
<version>1.0-SNAPSHOT</version>
6+
<version>1.1-SNAPSHOT</version>
77
<name>codedx-transaction-fraud-library</name>
88
<url>http://maven.apache.org</url>
99

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"type": "record",
3+
"name": "ProcessedTransactionFeatures",
4+
"namespace": "com.codedstream.transfruad.library.schema",
5+
"fields": [
6+
{"name": "transactionId", "type": "string"},
7+
{"name": "timestamp", "type": "long"},
8+
{"name": "merchant", "type": "float"},
9+
{"name": "category", "type": "float"},
10+
{"name": "amt", "type": "float"},
11+
{"name": "first", "type": "float"},
12+
{"name": "last", "type": "float"},
13+
{"name": "gender", "type": "float"},
14+
{"name": "city", "type": "float"},
15+
{"name": "state", "type": "float"},
16+
{"name": "zip", "type": "float"},
17+
{"name": "lat", "type": "float"},
18+
{"name": "long", "type": "float"},
19+
{"name": "city_pop", "type": "float"},
20+
{"name": "job", "type": "float"},
21+
{"name": "merch_lat", "type": "float"},
22+
{"name": "merch_long", "type": "float"},
23+
{"name": "hour", "type": "float"},
24+
{"name": "dayofweek", "type": "float"},
25+
{"name": "month", "type": "float"},
26+
{"name": "day", "type": "float"},
27+
{"name": "dist_to_merchant_km", "type": "float"},
28+
{"name": "is_fraud", "type": "boolean", "default": false}
29+
]
30+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* Autogenerated by Avro
3+
*
4+
* DO NOT EDIT DIRECTLY
5+
*/
6+
package com.codedstream.transfruad.library.schema;
7+
@org.apache.avro.specific.AvroGenerated
8+
public enum AlertSeverity implements org.apache.avro.generic.GenericEnumSymbol<AlertSeverity> {
9+
LOW, MEDIUM, HIGH, CRITICAL ;
10+
public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"enum\",\"name\":\"AlertSeverity\",\"namespace\":\"com.codedstream.transfruad.library.schema\",\"symbols\":[\"LOW\",\"MEDIUM\",\"HIGH\",\"CRITICAL\"]}");
11+
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
12+
13+
@Override
14+
public org.apache.avro.Schema getSchema() { return SCHEMA$; }
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* Autogenerated by Avro
3+
*
4+
* DO NOT EDIT DIRECTLY
5+
*/
6+
package com.codedstream.transfruad.library.schema;
7+
@org.apache.avro.specific.AvroGenerated
8+
public enum AlertType implements org.apache.avro.generic.GenericEnumSymbol<AlertType> {
9+
AMOUNT_ANOMALY, VELOCITY_ANOMALY, LOCATION_ANOMALY, TIME_ANOMALY, MERCHANT_RISK, BEHAVIORAL_ANOMALY, MULTIPLE_FACTORS ;
10+
public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"enum\",\"name\":\"AlertType\",\"namespace\":\"com.codedstream.transfruad.library.schema\",\"symbols\":[\"AMOUNT_ANOMALY\",\"VELOCITY_ANOMALY\",\"LOCATION_ANOMALY\",\"TIME_ANOMALY\",\"MERCHANT_RISK\",\"BEHAVIORAL_ANOMALY\",\"MULTIPLE_FACTORS\"]}");
11+
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
12+
13+
@Override
14+
public org.apache.avro.Schema getSchema() { return SCHEMA$; }
15+
}

0 commit comments

Comments
 (0)