use database DQ_MART;
use schema WORKING;
WITH ASCENDER_EMPLOYEE AS (
**SELECT DISTINCT EMPLOYEE_ID FROM RECONCILLIATION_ASCENDER_WORKER_TIMESHEET**
),
WORKDAY_EMPLOYEE AS (
**SELECT DISTINCT EMPLOYEE_ID FROM RECONCILLIATION_WORKDAY_WORKER_TIMESHEET**
)
SELECT 'Missing employee in Ascender' DQ_RULE_NAME,
RECONCILLIATION_WORKDAY_WORKER_TIMESHEET.EMPLOYEE_ID KEY
FROM WORKDAY_EMPLOYEE WORKDAY
LEFT OUTER JOIN ASCENDER_EMPLOYEE ASCENDER
ON ASCENDER.EMPLOYEE_ID = WORKDAY.EMPLOYEE_ID
;
大家好,我对 Snowflake SQL CTE 有点陌生。在上面的查询中,我收到一个错误,错误:此行中的无效标识符“RECONCILLIATION_WORKDAY_WORKER_TIMESHEET.EMPLOYEE_ID”(第 16 行)
RECONCILLIATION_WORKDAY_WORKER_TIMESHEET.EMPLOYEE_ID
访问同一个表的选择语句运行正常。表所在的数据库和模式设置正确,并且我确实对表有 SELECT 授权。
Snowflake 中是否存在导致错误发生的范围可见性。任何建议都将受到欢迎。