This topic describes how to query the results of a Scheduled SQL job in a destination Logstore or Metricstore.
Prerequisites
You have created a Scheduled SQL job.
-
To process data from a source Logstore and store the results in a destination Logstore, see Create a Scheduled SQL job to import data from one Logstore to another.
-
To process data from a source Logstore and store the results in a destination Metricstore, see Create a Scheduled SQL job to import data from a Logstore to a Metricstore.
-
To process data from a source Metricstore and store the results in a destination Metricstore, see Create a Scheduled SQL job to import data from one Metricstore to another.
Query results in a destination Logstore
You can query the results of a Scheduled SQL job in the destination Logstore by using the job name.
Log on to the Simple Log Service console.
-
Obtain the name of the Scheduled SQL job.
In the Projects section, click the project you want.
-
In the left-side navigation pane, choose . In the Scheduled SQL list, click the destination job.
-
On the Basic Information tab, obtain the job name.

-
Query the job results.
-
Go to the destination Logstore. For more information, see Quick start for Search & Analyze.
-
In the search box, enter
__tag__:__job__: job-name.Replace job-name with the job name that you obtained in step 2.
-
Click 15 Minutes (Relative) to set the time range for your query.
NoteIf no data is returned, expand the time range.
-
Click Search & Analyze.

-
Query results in a destination Metricstore
You can query the results of a Scheduled SQL job in the destination Metricstore by using the metrics that you defined in the job.
Log on to the Simple Log Service console.
In the Projects section, click the one you want.

On the tab, click the metricstore you want.
-
Click 15 Minutes (Relative) to set the time range for your query.
NoteIf no data is returned, expand the time range.
-
Enter a query statement for the relevant metric and click Execute Now.
The metric is the one that you specified when you created the Scheduled SQL job.
