I think this is a frequent issue with the Snowflake connector in ADF.
The query might not always return consistent results due to timing issues, such as transactions still being in progress or uncommitted data.
You need to verify that your query reads committed data so you can use the WITH(NOLOCK)
equivalent for Snowflake by appending WITH READ COMMITTED
to your query, if applicable of course.
Snowflake has resource limits, and if multiple queries or jobs are hitting the database simultaneously, the query used in ADF might get throttled or deprioritized.
Another detail, ADF might cache old query results in some cases, causing it to return outdated or empty data intermittently.
Try to add a timestamp or a NO_CACHE
clause to your query to ensure ADF always fetches the latest data from Snowflake:
SELECT
I recommend that you turn on verbose logging in the pipeline run to capture detailed information about the Lookup activity, including the query executed and the connection status.
In the documentation :
- The Lookup activity can return up to 5000 rows; if the result set contains more records, the first 5000 rows will be returned.
- The Lookup activity output supports up to 4 MB in size, activity will fail if the size exceeds the limit.
- The longest duration for Lookup activity before timeout is 24 hours.