Support Questions

Find answers, ask questions, and share your expertise
Announcements
Now Live: Explore expert insights and technical deep dives on the new Cloudera Community BlogsRead the Announcement

Submit query via the Impala api service on the CDP gateway page

avatar
Explorer

Hello,

On the CDP gateway page a number of API services are listed among which Impala. The endpoint has the format https://host:port/gateway/cdp-proxy-api/Impala. My question is can this endpoint be used to submit actual queries? And, if yes, is there any documentation available? 

Thank you!

1 REPLY 1

avatar
Master Collaborator

Hi, I have not tested it may be you can try something like this and see if that works.

curl -X POST "https://cdp.company.com/gateway/cdp-proxy-api/Impala/api/v1/query" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "query": "SELECT * FROM sales_data WHERE date >= current_date - interval 7 days;", "database": "analytics_db", "async": false }'

Cloudera API overview:

https://docs.cloudera.com/cdp-public-cloud/cloud/api/topics/mc-api-overview.html?utm_source=chatgpt....

Regards,

Chethan YM