Reporting

Data model calculated field dependencies

behudelson
Path Finder

Hi all,

I am trying to use data models to extract a search time value from a lookup. However, the value I am using to join to the lookup table is extracted from the source. I have no other way to get the value other than from the file name.

For example, I have the following regex extraction against source. It is configured in both my data model and as a calculated field:

(?<SourceFolder>[\w-]+).(?<SourceIdentifier>\d+)[\D]+

When I preview or run a search, these fields get populated.

I also have a lookup that has the SourceIdentifier field with matching values. I configured a lookup field in DataModels to add some of the lookup fields to my searches. My lookup field configuration is at the bottom of the list.

When I preview or run a search, these fields do not get populated.

Splunk documentation says: "When Splunk software evaluates calculated fields, it evaluates each expression as if it were independent of all other fields. You cannot chain calculated field expressions, where the evaluation of one calculated field is used in the expression for another calculated field." (https://docs.splunk.com/Documentation/Splunk/7.2.5/Knowledge/definecalcfields)

However, at the bottom of the data models page there is a message that says: "Calculated fields are processed in the order above, so ensure any dependent fields are defined first. Drag to rearrange." (You can find this message by clicking into an unaccelerated data model and scrolling to the bottom of the page.)

I've attempted to work on this issue in both Splunk Enterprise and Splunk Cloud. Both are running v 7.0.8.

Is what I am attempting to do possible?

If not, is there another route to accomplish the same thing?

Thank you!

0 Karma
1 Solution

lakshman239
Influencer

Are you having a custom datamodel? If I understand correctly, you want to extract a few fields from 'filename', which you want to use later to map to a 'field' in the datamodel. One way to approach this would be to use search time precedence.

https://docs.splunk.com/Documentation/Splunk/7.2.5/Knowledge/Searchtimeoperationssequence

  • extract the fields which you want using in-line or REPORT-transforms. (e.g SourceIdentifier)
  • use lookups to OUTPUT the field names (e.g. action in email datamodel) that needs to be mapped to datamodel, using SourceIdentifier or any other field extracted.

use btool to check/troubleshoot - https://docs.splunk.com/Documentation/Splunk/latest/Troubleshooting/Usebtooltotroubleshootconfigurat...

View solution in original post

0 Karma

lakshman239
Influencer

Are you having a custom datamodel? If I understand correctly, you want to extract a few fields from 'filename', which you want to use later to map to a 'field' in the datamodel. One way to approach this would be to use search time precedence.

https://docs.splunk.com/Documentation/Splunk/7.2.5/Knowledge/Searchtimeoperationssequence

  • extract the fields which you want using in-line or REPORT-transforms. (e.g SourceIdentifier)
  • use lookups to OUTPUT the field names (e.g. action in email datamodel) that needs to be mapped to datamodel, using SourceIdentifier or any other field extracted.

use btool to check/troubleshoot - https://docs.splunk.com/Documentation/Splunk/latest/Troubleshooting/Usebtooltotroubleshootconfigurat...

0 Karma

behudelson
Path Finder

Hi @laksman239, thanks for the assist. I was trying to use a data model field that an autolookup props.cong entry was more suitable for. props.conf entry:

[my_source_type]
LOOKUP-class = mylookup LookupID as SourceIdentifier OUTPUT LookupField

Thanks!

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

SOK it to Me: Top 3 Benefits of Using Splunk Operator on Kubernetes that’ll Make ...

    Thursday, July 9, 2026  |  11:00AM–12:00PM PDT Duration: 1 hour (includes Q&A) Managing can feel like a ...

Upgrade Prep for 10.4, Network Observability Deep Dives, and More from Splunk Lantern

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...

Splunk Developer Day announcements: AI agents, MCP tools, Forecasting, and Custom ...

Splunk Developer Day was packed with product and platform updates for developers building in the AI ...