Expand my Community achievements bar.

Query Service - Query Execution Fails via API

Avatar

Level 3

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.

vikash4_0-1678718297232.png

 

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.
 
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

2 Replies

Avatar

Community Advisor

@vikash4 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

Avatar

Level 3

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
vikash4_1-1678789515755.png

 

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]vikash4_0-1678789360298.png

 

Tried with individual column also but not luck...

vikash4_2-1678789891132.png

 

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