Forum Discussion
7 Replies
- asaelData Storage
Hi HamzaJ​
What is that API?
I was seeking for something like that but I have not found it..
Actually I am not using any widget of Sisense.. we just use the data that we get form our datasource using JAQL and with that data we create our report (the report is created by us- coding)... maybe in the future we could use some widgets but now we are trying is to convert the JAQL query into a SQL..
can you share to me the API name?
- HamzaJData Integration
It's the following api: POST /datasources/{cubeName}/jaql/sql
- asaelData Storage
I tested that endpoint and actually it returned a SQL query based on my JAQL query but that sql query was generated with the table names modified.. I meat that the it added other letters to my table names...
and when I tried to execute those SQL queries on this api : /api/datasources/{cubeName}/sql?query=
it returns error:in some sql queries return this error
"status": 401,
"httpMessage": "Unauthorized"
in other returns :
"error": true,
"details": "{\"error\":\"Query could not be compiled.\\nFound '.' but expected ')'.\\nFound '.' but expected '<Identifier>'.\\nFound '.' but expected ')'.\\nFound '.' but expected '<Identifier>'.\\nFound '.' but expected '<End of Expression>'.\"}",
"type": "500",
do you know if do i need to take into account something that i did not be aware - asaelData Storage
the sql generated is doing a INNER JOIN with a table that does not exist (i do not have any table in our cube with that name)
- HamzaJData Integration
Only admins can run sql?query= if I am not mistaken. That jaql/sql endpoint is the only endpoint that translates jaql to sql. If it isnt usable, then I am afraid there is no way to translate a jaql to sql within Sisense itself. You would have to translate it somehow yourself unfortunately.