Open gauravsinghaec opened 3 weeks ago
Actually you don't need a UDF. It was done forcefully in this example.
Basically the CQL query is also misleading.
SELECT id, top10(created_at) AS date FROM recent_videos_view;
this is bad as you are UDF on every row and basically you have same set to date(which is array of top created_at).
Anyway as the example has only 9 rows. This UDF is not needed.
Below 3 things I did to fix the start issue.
USE streaming;
The the npm run migrate
will run successfullyqueryVideoDates
and rawVideos
values as below in file video-streaming/src/pages/api/list-videos.ts. Now npm run dev
will work fine
const queryVideoDates = "SELECT id, created_at AS date FROM recent_videos_view;"
const rawVideos = await cluster.execute(query, [videoDates.rows.map((row) => row?.date)], { prepare: true })
TADA your app is running now
The migration is failing. and looks like the Scylla cloud doesn't support the experimental feature
Do we have a way to set the flag with cloud, OR you can update the documentation for the workaround.