1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "leftCsv": """order_id,email,total,status
10A-1001,ana@example.com,49.00,paid
11A-1002,ben@example.com,15.50,paid
12A-1003,cy@example.com,120.00,refunded
13A-1004,dee@example.com,8.99,paid
14A-1005,eli@example.com,64.20,paid
15A-1006,fay@example.com,30.00,paid
16,gus@example.com,12.00,paid
17""",
18 "rightCsv": """Order ID,Customer Email,Amount,Payment Status
19A-1001,ana@example.com,49.00,paid
20A-1002,ben@example.com,15.50,paid
21A-1003,cy@example.com,120.00,paid
22A-1004,dee@example.com,8.99,paid
23A-1004,dee@example.com,8.99,paid
24A-1005,eli@example.com,64.02,paid
25A-1007,hal@example.com,22.00,paid
26""",
27 "keyPairs": [{
28 "left": "order_id",
29 "right": "Order ID",
30 }],
31 "comparePairs": [
32 {
33 "left": "email",
34 "right": "Customer Email",
35 },
36 {
37 "left": "total",
38 "right": "Amount",
39 },
40 {
41 "left": "status",
42 "right": "Payment Status",
43 },
44 ],
45}
46
47
48run = client.actor("kestrelwick/csv-export-parity-auditor").call(run_input=run_input)
49
50
51print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
52for item in client.dataset(run.default_dataset_id).iterate_items():
53 print(item)
54
55