0 votes

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?

asked by

1 Answer

0 votes
Is the table sfo_prepared exists ? or is it in the right schema ?
answered by
edited by
944 questions
978 answers
989 comments
2,153 users

┬ęDataiku 2012-2018 - Privacy Policy