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