Ok, I understood properly :-)
The file is created on the file system, I see event in the Velo console but nothing is dumped in the file!? Did I miss something else?
 1LET artifacts_to_watch = SELECT Artifact FROM parse_csv(
 2       filename=artifactParameterMap, accessor='data')
 3  WHERE get(item=scope(), member=Parameter) AND log(
 4    message="Dumping artifact " + Artifact + " into JSONL file")
 5LET events = SELECT * FROM foreach(
 6    row=artifacts_to_watch,
 7    async=TRUE, 
 8    query={
 9       SELECT *, "Artifact_" + Artifact as _index,
10              Artifact,
11              timestamp(epoch=now()) AS timestamp,
12              client_info(client_id=ClientId).os_info.hostname AS Hostname
13       FROM watch_monitoring(artifact=Artifact)
14    })
15
16SELECT * FROM write_jsonl(
17  filename=Filename,
18  query=events
19)