Adapter Services that returns only one row


I was wondering how I can create and adapter service that doesn’t return a document list.

Example, I usually create an adapter service that execute and sql statement that I know it will return only 1 value/row. No matter what settings I set in the adapter the generate output will contain a document list

This output structure makes me do a Loop in my Flow Service just to get that one value.

Is there a way to tell the adapter no to create the document list output?

Francisco Pereira

Your array of documents(documentlist) is a product of your SQL statement not the jdbc adapter. Try changing your sql so that it only returns one value ie select distinct or modify your where clause so that it selects a unique row.

If your SQL returns more than one row then you will get an array of results.

If you know you are only getting one row back, you can map the values you are looking for directly from the output using the edit indices on the properties tab. Just highlight the mapping line to see the properties panel so that you can map out only the first row.

Even without setting the index, if u just map the field inside doc list to some other field, by default, it takes the first value and maps…