Advanced Designer Learning Path is now live! Read More

Scenario SQL result limited to 10

Neuron
Neuron
Scenario SQL result limited to 10

Hello Community, 

Small question: If I try to run some SQL code inside a scenario

SELECT Order_id, COUNT(1)
FROM mySQL
GROUP BY Order_id
ORDER BY Order_id

the number of result seems always to be limited to 10 (as can be seen in the attached log, lines 16 ).

It seems that instead of the code above the following code seems to be executed

Initialize statement for 'select top(10)  Order_id, COUNT(1)
FROM MySQL
GROUP BY Order_id
ORDER BY Order_id' (maxRows=10)

What do I need to change in order to get the correct results (17 distinct values).

Thanks in advance

Marc Robert

0 Kudos
4 Replies
Dataiker
Dataiker

Hello,

The SQL step of a scenario was made to retrieve data so they can be used to determine next scenario steps.

It is not intended to retrieve and log a full dataset.

If you want to extract a subpart of your table from a query, you can create a new SQL dataset from a query or you can use an SQL query recipe.
You can also create an SQL notebook if you just want to explore your database.

Hope this helps!

 

Neuron
Neuron
Author

Hello Pierre, 

Thank you for your quick responds.

0 Kudos
Neuron
Neuron
Author

Hello Community.

Is it possible to run a SQL/Python notebook from inside a scenario (and thus not having the limitation of 10 records?)

Thanks in advance

 

0 Kudos
Neuron
Neuron

Hello @MRvLuijpen,

Yes, you can execute a SQL statement from Python within an Execute Python step in a Scenario. Check out the deck here for examples of interacting with SQL through Python: https://community.dataiku.com/t5/Online-Events/Using-the-Dataiku-DSS-Python-API-for-Interfacing-with...

You should be able to use most of methods described in a Scenario.

What are you trying to accomplish?

Marlan

A banner prompting to get Dataiku DSS