我有Airflow,
尝试创建API请求,例如GET版本
DECLARE @ts BIGINT;
SELECT @ts =(SELECT cpu_ticks/(cpu_ticks/ms_ticks) FROM sys.dm_os_sys_info);
SELECT
DATEADD(ms,-60 *(@ts - [timestamp]),GETDATE()) AS [EventDate] ,
100 - SystemIdle - SQLProcessUtilization AS [Total(%)],
SQLProcessUtilization AS [SQL Server(%)]
FROM (SELECT record.value('(./Record/@id)[1]','int')AS record_id,
record.value('(./Record/SchedulerMonitorEvent/SystemHealth/SystemIdle)[1]','int')AS [SystemIdle],
record.value('(./Record/SchedulerMonitorEvent/SystemHealth/ProcessUtilization)[1]','int')AS [SQLProcessUtilization],
[timestamp]
FROM (SELECT[timestamp], convert(xml, record) AS [record]
FROM sys.dm_os_ring_buffers
WHERE ring_buffer_type =N'RING_BUFFER_SCHEDULER_MONITOR'AND record LIKE'%%')AS x )AS y
where [EventDate] > dateadd(day,-1, getdate()) -- Throws an error like 'EventDate Invalid Column'
ORDER BY record_id DESC;
执行后返回Airflow 404 =大量圈子
如何解决这个问题?
答案 0 :(得分:0)
气流1.8.1(或更高版本)似乎不支持此rest插件(https://github.com/teamclairvoyant/airflow-rest-api-plugin)。请使用1.8.0(或更低版本)安装与上述REST API插件兼容的气流1.8。请使用install命令,而不是先安装1.8.1。
答案 1 :(得分:0)