'Recursive View Message - Azure Data Bricks

Error :

AnalysisException: Recursive view management_db.v_extract detected (cycle: management_db.v_extract -> management_db.v_extract)

Query outisde of the view works , but putting query in view fails with error above .

Any ideas on how to resolve this error ?

CREATE OR REPLACE VIEW management_db.v_FINAL_EXTRACT as

select
  A.*,
  B.CURRENCY,
  B.X_REVENUE_TOTAL,
  B.Y_REVENUE_TOTAL
 
from
  (
    SELECT
      A.CUSTOMER,
      A.AGREEMENT,
      A.SOURCEKEY,
      COUNT(A.CURRENCY) AS NUMBER_OF_CURRENCIES_PRESENT
    From
      management_db.v_EXTRACT A
    group by
      CUSTOMER,
      AGREEMENTN,
      SOURCEKEY
    having
      COUNT(CURRENCY) > 1
  ) As A
  left outer join management_db.v_EXTRACT B on A.SOURCEKEY = B.SOURCEKEY


Solution 1:[1]

Works now . Mysterious. Works now . Mysterious. Works now . Mysterious

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 James Khan