Query Service - Query Execution Fails via API | Community
Skip to main content
New Participant
March 13, 2023
Question

Query Service - Query Execution Fails via API

  • March 13, 2023
  • 1 reply
  • 1182 views

Hi,

I've a simple query which I'm executing from Query Service UI & API.

Query Service UI execution return records successfully where as API query execution fails. I can see status of both the execution in Query Service log.

 

I'm executing the same query from UI & API.

Query : Select * FROM <table_Name>

 

API Payload : 

{
        "dbName""<sandbox>:cjm_qsaccel",
        "sql""SELECT * FROM <table_Name>",
        "name""API Test Query6",
        "description""API Test Query Description4"
 }
Is there anything which I'm missing in query execution via API?
Thanks.
 
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Anil_Umachigi
Employee
March 14, 2023

@vikashyadav Curious what API endpoint are you using? Also selecting all columns ( SELECT *) via API may probably push the limits of api response based on how much data you have. 

Have you tried limiting to few columns and limit the rows returned? 

 

Anil

New Participant
March 14, 2023

Hi @anil_umachigi,

API End Point: POST https://platform.adobe.io/data/foundation/query/queries

Payload :  

{
        "dbName""<sandbox>:cjm_qsaccel",
        "sql""SELECT * FROM <table_Name>",
        "name""API Test Query6",
        "description""API Test Query Description4"
 }
Total Record Count : 1
Total Column Count : 8
Query Execution time : <10 min

 

I was going through the query service quardrails but I didn't see any restrictions at record count or number of columns except execution time.
 
Error on query execution via API : 
Analysis error encountered. Reason: [sessionId: <sessionId> queryId: <queryId> Relation "<datasetname>" does not exist]

 

Tried with individual column also but not luck...

 

One more ask, I want to download the entire log for this execution. I've log id, how can i download the logs?