1 Answer
- Newest
- Most votes
- Most comments
0
# Example in Glue ETL script
from awsglue.context import GlueContext
from awsglue.job import Job
import sys
glueContext = GlueContext(SparkContext.getOrCreate())
job = Job(glueContext)
# Assuming you're using a DynamicFrame
df = glueContext.create_dynamic_frame.from_catalog(
database="db_name",
table_name="table_name",
push_down_predicate="enddate = '2024-11-27'"
)
# Convert to DataFrame, create a temporary view
df.toDF().createOrReplaceTempView("filtered_table")
# Now use this view in your customSQL
customSQL_rule = "customSQL 'select count(*) from filtered_table' > 0"
answered 2 years ago
Relevant content
asked 3 years ago
asked a year ago
asked a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
