Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Following the tutorial on Using SQL in Python when trying to execute the Python code to extract the initial data from the dataset in the flow, SQLExecutor throws an error stating that the relation dataset does not exist.
The code is literally copy-pasted from the tutorial
sfo_prepared = dataiku.Dataset("sfo_prepared")
executor = SQLExecutor2(dataset=sfo_prepared)
mf_manufacturers = executor.query_to_df(
"""
select "Aircraft Manufacturer" as manufacturer,
sum("Landing Count") as count
from sfo_prepared
group by "Aircraft Manufacturer"
order by count desc limit 5
""")
Error message
-----
Error in Python process: At line 25: <type 'exceptions.Exception'>: None: During query ' select "Aircraft Manufacturer" as manufacturer, sum("Landing Count") as count from sfo_prepared group by "Aircraft Manufacturer" order by count desc limit 5 ': ERROR: relation "sfo_prepared" does not exist Position: 122
-----
This code is being run as a recipe within the flow and not as a separate Notebook.
Any idea of what would be causing this issue?