Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2024 06:50 AM - edited 06-19-2024 01:26 AM
I am trying to create a simple dlt pipeline:
@dlt.table
def today_latest_execution():
return spark.sql("SELECT * FROM LIVE.last_execution")
@on_event_hook
def write_events_to_x(event😞
if (
today_latest_execution().count() == 0
😞
try:
...
And I am getting and error:
'Dataset' object has no attribute 'count'
What I have tried: convertion to pandas (via ToPandas() or to_pandas_on_spark doesn't work), koalas doesn't work, using diff functions (not spark.sql) doesn't work... I am stuck 😞
How to make my function return me dataframe instead of dataset?