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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...