Reputation: 71
I have a set of delimitted text files stored in a directory in my local filesystem. I wanted to ingest all these delimitted text files into marklogic using mlcp.
While ingestion, I am performing some transformation on the input content, to create a new field in each of the ingested document whose value will be its source filename.The purpose of this is to classify the ingested documents according to different file sources. For this purpose I wanted to pass the input filename into the transformation module.
Is there any way I can do this?
Upvotes: 1
Views: 102
Reputation: 20414
You can either:
-transform_param=$filename
on the command-line somehow,map:get($content, "uri")
, and extracting the original csv name out of that uri with string manipulationHTH!
Upvotes: 2