Skip to content

[FEATURE] Support _/- as parsed field name #3944

Closed

Description

@penghuo

Is your feature request related to a problem?

The following query failed with SemanticCheckException.

source=test001 | parse message 'endpoint=/(?<action_code>\\w+)' | fields action_code

{
  "error": {
    "reason": "Invalid Query",
    "details": "can't resolve Symbol(namespace=FIELD_NAME, name=action_code) in type env",
    "type": "SemanticCheckException"
  },
  "status": 400
}

What solution would you like?
The query should works successfully.

What alternatives have you considered?
n/a

Do you have any additional context?
Add any other context or screenshots about the feature request here.

Activity

  1. added
    enhancement
    PPL
    on Jul 30, 2025
  2. songkant-aws commented on Aug 11, 2025

    @songkant-aws
    Collaborator

    I can take a look

  3. RyanL1997 commented on Oct 8, 2025

    @RyanL1997
    Collaborator

    Hi @songkant-aws , I saw that you have assigned yourself this issue. And just letting you know this can be covered by the related enhancement I'm currently working on for rex : #4434.

  4. RyanL1997 commented on Oct 9, 2025

    @RyanL1997
    Collaborator

    Also, adding some input that me and @penghuo discussed earlier today about this type of known limitations coming from java regex library:

    According to the above, here are some action items / work around that we can do:

    curl -X POST "localhost:9200/_plugins/_ppl" \
        -H "Content-Type: application/json" \
        -d '{
          "query": "source=accounts | rex field=email \".+@(?<domain>.+)\" | rename domain as domain_name | fields email, domain_name | head 5"
        }'
    
    {
      "schema": [
        {
          "name": "email",
          "type": "string"
        },
        {
          "name": "domain_name",
          "type": "string"
        }
      ],
      "datarows": [
        [
          "[email protected]",
          "pyrami.com"
        ],
        [
          "[email protected]",
          "netagy.com"
        ],
        [
          "[email protected]",
          "quility.com"
        ],
        [
          "[email protected]",
          "boink.com"
        ],
        [
          "[email protected]",
          "scentric.com"
        ]
      ],
      "total": 5,
      "size": 5
    }
  5. moved this from Not Started to Done in PPL Trackeron Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

PPLenhancement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions