If need to use the DATAFABRIC/compass/v2/jobs/ service in an API flow but are unable to add a query to the request body, do you have any suggestions on how to proceed?
*** Content Type : text/plain
If it the query you are after, use Compass to generate it. Navigate to DataFabric -> Datalake -> Compass
Search for an object e.g. HCM_Employee,
You can generate SQL for the Object, or Object Properties, just select the ellipses to the right, then Generate the SQL you need
SELECT "HCM_Employee"."Employee"FROM "HCM_Employee"
hi @manaus, I am currently experiencing the exact same issue you described with compass/v2/jobs api call, and I haven't been able to find a workaround yet.
Could you please share how you managed to successfully include a "body" in the request within that API flow? Any details or snippets you could provide would be extremely helpful.
Looking forward to hearing from you.
Thanks a lot.
Regards,
David
Have you checked the Data Lake Query in a Data Flow, then you can easily add Compass Queries as source for a Data flow.
Hello Christiaan, thank you very much for your suggestion and for taking the time to reply.
I have checked the Data Lake Query option in a Data Flow as you mentioned. However, my specific challenge lies in the creation of an Infor API Flow.
In this particular setup, I don't have the option to perform direct queries to the Data Lake. Instead, I am restricted to using APIs to retrieve data from it. This is why I was looking for a way to include a "body" in the request within that specific API Flow, as @manaus mentioned at the beginning of this thread when describing the same issue.
If you have any insights on how to handle this within the API Flow constraints, I would greatly appreciate it.
Thanks again!
The Request Body of that API is text/plain and in the API Flow you do need application/json for API calls, this prevents the usage of this API in an API flow. According to documentation: "Only JSON request body and JSON response are supported by API Gateway Flows." I guess that in your use-case the Compass query is to be created dynamically on input received earlier. A workaround could be to create an API suite as wrapper around the standard API call, but I have not tested that.