It looks like the issue is occurring because the ADF Lookup activity expects a tabular result, but your current query does not return a result set. Instead, it assigns values to variables and uses RAISE NOTICE, which does not return data in a format that ADF can process.
Why Does This Query Fail in ADF?
ADF Lookup Activity Expecting a Table Format - ADF Lookup expects a tabular result (rows and columns), but this query does not return a result set. Instead, it stores results in variables (ColList
, DataTypeList
) and prints them using RAISE NOTICE
, which is not useful in ADF.
Solution: Use a SELECT
Statement Instead of RAISE NOTICE
Replace:
RAISE NOTICE '%', ColList;
RAISE NOTICE '%', DataTypeList;
With:
SELECT ColList AS column_names, DataTypeList AS data_types;
This way, ADF Lookup will receive a proper table format like:
- column_names - "id","name","age"
- data_types - integer,text,integer
Why This Fix Works?
Instead of just printing values, this query returns a table format (column_names
and data_types
). ADF Lookup activity can now capture and process the output correctly.
I hope this information helps. Please do let us know if you have any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.