cancel
Showing results for 
Search instead for 
Did you mean: 

Fetching 1k records from table using "Snowflake select snap"

darshthakkar
Valued Contributor

I’m planning to fetch the data from a table using “Snowflake select snap” while putting the condition of getting 1k records ONLY in WHERE clause however it is not getting any results.

I can put the entire query in “Snowflake execute snap” as well but wanting to do with Snowflake Select as of now. Any help is highly appreciable.

Thanks!

1 ACCEPTED SOLUTION

darshthakkar
Valued Contributor

Wanted to share the solution here. The query was right, no need to change the “Fetch-size” as well.
The only thing that was missing was ’ ’ for the IDs that we were passing in the query. Thus, the query would look like -
WHERE NAME IN (‘102345’, ‘1701’, ‘5604878’)

View solution in original post

27 REPLIES 27

Sorry, I didn’t explained myself correctly. I meant send the query here, without the ids.

There you go:

SELECT
CREATED,
CREATED_BY,
FAQ_QUES_TEXT,
INTR_PUBLISH_FLG,
LAST_UPD,
LAST_UPD_BY,
MODIFICATION_NUM,
NAME,
PR_AUTHOR_ID,
PUBLISH_FLG,
RESOLUTION_TEXT,
ROW_ID,
STATUS_CD,
TYPE_CD,
X_PROD_FAMILY,
X_PROD_VER,
X_REGION,
X_RESOLUTION_TEXT,
X_SUB_AREA
FROM S_RESITEM

*** removed where clause ***

The query seems ok. What’s the situation when you turn off the expression support? What’s the output of the Select snap when you validate?

Getting a different error this time:
image

Index out of bounds; I believe is because of those 1000 IDs. I can remove those 1k IDs and validate the error again.

darshthakkar
Valued Contributor

Getting the same error even though reducing the IDs in where clause to 6:

image

Also the query has been limited to 10 records too.

image