Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2023 09:48 PM
@Jyoti j :
can you create a temporary view using your CTE statement and then query that view using Spark JDBC. Here's an example of how you can create a temporary view using a CTE statement:
spark.sql("WITH cte AS (SELECT * FROM table_name WHERE column_name = 'some_value') \
SELECT * FROM cte").createOrReplaceTempView("temp_view_name")