These are tables(columns):
logs(metric_name, locale, rampcode, environment, timestamp, level).
Below is the description of columns:
locale refers to application locale(values can be one of [en-us, ko-kr]).
rampcode refers to the type of device application is serving (values can be one of [tv, mobile])
environment refers to deployment environment (values can be one of [production, staging or integration])
timestamp refers to timestamp when message was logged(value is unix timestamp)
level refers to type of the log (values can be one of [info, debug or error])
metric_name refers to the name of metric emitted from the application( values can be one of [bse_request_count, asr_latency, bixbyttsfail])
This is the text: Get the error logs for bixbyttsfail that occurred for mobile and en-us in the last 15 mins in production.
Translate the text into SQL query based on table and columns provided.
1.write the FROM clause: from log
2. write the where clause: where environment='production' and metric_name='bixbyttsfail' and rampcode='mobile' and locale='en-us' and level='error' and timestampdiff(second, current_timestamp(),timestamp) >= 900
3. write the select statements: select *
4. final sql query: select * from log where environment='production' and metric_name='bixbyttsfail' and rampcode='mobile' and locale='en-us' and level='error' and timestampdiff(second, current_timestamp(),timestamp) >= 900
These are tables(columns):
logs(metric_name, locale, rampcode, environment, timestamp, level)
This is the text: show the logs for asr_latency for ko-kr for staging environment for past 2 days.
Translate the text to SQL query base on tables(columns).
1.write the FROM clause: from log
2. write the where clause: where environment='staging' and metric_name='asr_latency' and locale='ko-kr' and timestampdiff(second, current_timestamp(),timestamp) >= 172800
3. write the select statements: select *
4. final sql query: select * from log where environment='staging' and metric_name='asr_latency' and locale='ko-kr' and timestampdiff(second, current_timestamp(),timestamp) >= 172800
These are tables(columns):
logs(metric_name, locale, rampcode, environment, timestamp, level)
This is the text: show the logs for bixbyttsfail for ko-kr for integration environment for past 1 hour.