Splunk Search

dbxquery not able to update value

lmjoin115
Explorer

Hello Team , i try to pass value of time token in dbxquery to update current time , it not working. Without it is working fine

 

 

<form hideSplunkBar="true" hideEdit="false" script="submit_date.js">
<label>Cloud Studio - Migration Scheduler testing</label>

<init>
<set token="tokFromDate"></set>
<set token="tokToDate"></set>
<set token="defaut_time">$result.today$</set>
</init>

<search>
<query>| makeresults|eval today=strftime(_time,"%Y-%m-%dT%H:%M")|fields - _time</query>
<done>
<set token="defaut_time">$result.today$</set>
</done>
</search>
<search>
<query>|dbxquery connection="CloudAssessment2" query="UPDATE [Cloudstudio2].[dbo].integrated_assessment_mgl SET [Cloudstudio2].[dbo].integrated_assessment_mgl.pl_start_date='$tokFromDate$', [Cloudstudio2].[dbo].integrated_assessment_mgl.pl_end_date='$tokToDate$', [Cloudstudio2].[dbo].integrated_assessment_mgl.pl_current_date='$result.today$' WHERE [Cloudstudio2].[dbo].integrated_assessment_mgl.app_group=$tok_Application_Group$ AND [Cloudstudio2].[dbo].integrated_assessment_mgl.waves=$Waves$; UPDATE [Cloudstudio2].[dbo].integrated_assessment_mgl SET [Cloudstudio2].[dbo].integrated_assessment_mgl.pl_start_date = REPLACE(pl_start_date,'T',' '); UPDATE [Cloudstudio2].[dbo].integrated_assessment_mgl SET [Cloudstudio2].[dbo].integrated_assessment_mgl.pl_end_date = REPLACE(pl_end_date,'T',' '); UPDATE [Cloudstudio2].[dbo].integrated_assessment_mgl SET [Cloudstudio2].[dbo].integrated_assessment_mgl.pl_current_date = REPLACE(pl_current_date,'T',' '); " | dbxoutput output="integrated_assessment_mgl_date"; </query>
<earliest>0</earliest>
<latest></latest>

Labels (1)
Tags (1)
0 Karma
Get Updates on the Splunk Community!

Streamline Data Ingestion With Deployment Server Essentials

REGISTER NOW!Every day the list of sources Admins are responsible for gets bigger and bigger, often making the ...

Remediate Threats Faster and Simplify Investigations With Splunk Enterprise Security ...

REGISTER NOW!Join us for a Tech Talk around our latest release of Splunk Enterprise Security 7.2! We’ll walk ...

Introduction to Splunk AI

WATCH NOWHow are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. ...