0

Unable to query the data from table through MV

 Hi Folks,

When i am trying to load a table from MV, I am facing attached Error. Can any one know this error? please help me.

Example:  select ACCOUNTING_EVENT_ID from AP_INVOICE_DISTRIBUTIONS_ALL

Thank you in advance,

Vishnu Teja.

8replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • vishnu -- I am moving this to our Q&A section of the community. 

    Reply Like
  • Are you running Incorta against a spark URL that came bundled with Incorta or an external Spark cluster?

    Reply Like
  • Error says "unable to infer schema..." you are missing a reference to the schema. You should use something like below

     

    Select * from schema.table 

     

    Remeber it is case sensitive 

    Reply Like
    • Siva Kowsika  Thank you Siva for your prompt response 🙂, Please find the code i am using in spark SQL, Please let me know if i missed anything.

      Code:

      from pyspark.sql.functions import last_day
      from pyspark.sql.functions import date_format
      from pyspark import *
      import pyspark.sql.functions as F


      df_AP_INVOICE_DISTRIBUTIONS_ALL=read("EBS_AP.AP_INVOICE_DISTRIBUTIONS_ALL")
      df_AP_INVOICE_DISTRIBUTIONS_ALL.createOrReplaceTempView("AP_INVOICE_DISTRIBUTIONS_ALL")

      df= spark.sql("""
      SELECT 
          ACCOUNTING_EVENT_ID 
      FROM 
          AP_INVOICE_DISTRIBUTIONS_ALL 
      WHERE
      ACCOUNTING_EVENT_ID='XXX'
         """) 
      save(df)

      Reply Like
    • vishnu code looks ok to me , so you are able to save it but it errors while running?

      Reply Like
    • Amit Kothari  Exactly, when i am trying to add AP_INVOICE_DISTRIBUTIONS_ALL  table in MV then it is error out. 

      Reply Like
    • vishnu  let us do a quick zoom , will send a mail .

      Reply Like
    • Amit Kothari Thank you

      Reply Like
Like Follow
  • 2 mths agoLast active
  • 8Replies
  • 45Views
  • 4 Following