Ask Your Question
1

Directory Origin producing field names enclosed in 'single quotes'?!

asked 2019-10-09 20:44:27 -0500

Challenge Addict gravatar image

I'm running SDC 3.3.1.

I have a directory origin reading IIS log files using a regular expression.

All seems to work as expected, until you attempt to reference a field by its name. It took me a while, but I now realise that the field names are being enclosed in single quotes?! What am I doing wrong?

So in stead of /date, I'm getting /'/date'!

Defect demonstration screenshot

Sample pipeline (renamed as .JPG to enable me to attach it)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-10-09 20:50:24 -0500

Challenge Addict gravatar image

Counter intuitively, I found the solution to my problem was to remove the leading '/' from each fieldPath value in the Field Path To RegEx Group Mapping JSON configuration.

This is despite the default template suggestion starting with a '/'!

Ugh.

So in Field Path To RegEx Group Mapping I had:

[
    {
        "fieldPath": "/date",
        "group": 1
    },
    {
        "fieldPath": "/time",
        "group": 2
    }, 
    ...
]

Whereas, I needed to have:

[
    {
        "fieldPath": "date",
        "group": 1
    },
    {
        "fieldPath": "time",
        "group": 2
    }, 
    ...
]
edit flag offensive delete link more

Comments

1

That is strange. Could you file an issue at https://issues.streamsets.com/

metadaddy gravatar imagemetadaddy ( 2019-10-09 22:21:02 -0500 )edit

Hi @metadaddy, no problems. I have raised the issue here: https://issues.streamsets.com/browse/SDC-12659

Challenge Addict gravatar imageChallenge Addict ( 2019-10-14 18:50:09 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-10-09 20:44:27 -0500

Seen: 377 times

Last updated: Oct 09