blob: 9fa1d68e31c76a057f94d0f7be421e009548d57a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* syntax version 1 */
USE plato;
$logs_path = "//logs/antirobot-daemon-log2/1d";
$results_path = "//home/antispam/antirobot/sharding_daily";
$logs_per_run = 10;
DEFINE SUBQUERY $last_tables($path, $limit) AS
SELECT AGGREGATE_LIST(Name)
FROM (
SELECT ListLast(String::SplitToList(Path, "/")) as Name
FROM FOLDER($path)
WHERE Type = "table"
ORDER BY Name DESC
LIMIT $limit
)
END DEFINE;
$logs = (SELECT * FROM $last_tables($logs_path, $logs_per_run));
$processed_logs = (SELECT * FROM $last_tables($results_path, $logs_per_run));
SELECT SetDifference(ToSet($logs), ToSet($processed_logs))
|