$read function usage
Posted: Mon Oct 09, 2023 2:08 pm
Hello,
Me again with another question.
I am trying to read the contents of a txt file with the $read function and store it as a var with the populate variables processor.
I have this configured as:
set user variable %s_watermark% to $read("%recursed_path~1\watermark.txt)
I can see this gets picked up in the logs as:
"split_id": "1-0-0",
"event": "pre_evaluation",
"type": "trace",
"context": "node execution",
"host": "redacted",
"data": {
"name": "s_watermark",
"data": "_MyFileRead(\"foldername\\watermark.txt\")"
}
But the data then looks empty:
"split_id": "1-0-0",
"event": "populate_variable",
"type": "trace",
"context": "node execution",
"host": "redacted",
"data": {
"name": "s_watermark",
"type": "string",
"data": ""
}
Any ideas what I am doing wrong, the file is there and with some text in. Am I missing some key step to have the txt file contents read and stored?
Thank you,
Neil
Me again with another question.
I am trying to read the contents of a txt file with the $read function and store it as a var with the populate variables processor.
I have this configured as:
set user variable %s_watermark% to $read("%recursed_path~1\watermark.txt)
I can see this gets picked up in the logs as:
"split_id": "1-0-0",
"event": "pre_evaluation",
"type": "trace",
"context": "node execution",
"host": "redacted",
"data": {
"name": "s_watermark",
"data": "_MyFileRead(\"foldername\\watermark.txt\")"
}
But the data then looks empty:
"split_id": "1-0-0",
"event": "populate_variable",
"type": "trace",
"context": "node execution",
"host": "redacted",
"data": {
"name": "s_watermark",
"type": "string",
"data": ""
}
Any ideas what I am doing wrong, the file is there and with some text in. Am I missing some key step to have the txt file contents read and stored?
Thank you,
Neil