Highlighted
Super Contributor.
Super Contributor.
982 views

Parsing file Path in multifolder flex connector

Jump to solution

Hi, I have developed the multiple folder flex connector where I use sdkfilereader parser.

In agent.properties file I have enabled the following

agents[0].foldertable[0].extractfieldnames=filePath

agents[0].foldertable[0].extractregex=(\\+\\+\d+\.\d+\.\d+\.\d+\\+\w+\\+\w+\-\w+\.\w+)

agents[0].foldertable[0].extractsource=File Path

agents[0].foldertable[0].usefieldextractor=true

But I am not getting the File Path to  the ESM

I have also tried this way

agents[0].foldertable[0].extractregex=(.*)

Also not working

My files are located at \\11.11.11.11\FolderName\

File names are like this MSGTRKMS2016051013-1.LOG

I have tested both Regex and they are fine.

It is interesting that when I had only one folder the regex version agents[0].foldertable[0].extractregex=(.*) was working.

When I added 8 more folders it stopped working and I do not see any errors in the log files.

I have checked it and I have proper configuration for all all 8 folders.

Could you please let me know what could be wrong here?

P.S.

In sdkfilereader file I have these parameters and maybe they somehow make this problem?

delimiter=,

text.qualifier="

comments.start.with=\#

trim.tokens=true

contains.empty.tokens=true

start.at.line=2

Thanks

Labels (3)
1 Solution

Accepted Solutions
Highlighted
Super Contributor.
Super Contributor.

Re: Parsing file Path in multifolder flex connector

Jump to solution

I have just figured it out.

I have removed from sdkfilereader file the following property trim.tokens=true and used this config in agents property file

agents[0].foldertable[0].extractfieldnames=filePath

agents[0].foldertable[0].extractregex=(.*)

agents[0].foldertable[0].extractsource=File Path

agents[0].foldertable[0].usefieldextractor=true

and now it works.

Really strange, why trim.tokens=true option brakes everything.

View solution in original post

1 Reply
Highlighted
Super Contributor.
Super Contributor.

Re: Parsing file Path in multifolder flex connector

Jump to solution

I have just figured it out.

I have removed from sdkfilereader file the following property trim.tokens=true and used this config in agents property file

agents[0].foldertable[0].extractfieldnames=filePath

agents[0].foldertable[0].extractregex=(.*)

agents[0].foldertable[0].extractsource=File Path

agents[0].foldertable[0].usefieldextractor=true

and now it works.

Really strange, why trim.tokens=true option brakes everything.

View solution in original post

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.