You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consider persist=False as default when creating table from DataFrame #218
By default, when creating a table from a Dask Dataframe, the create_table function persists the Dask DataFrame in memory.
This was surprising (partly because I didn't see it in the doc examples) when working on a large ETL job. I suspect for most users (especially those running larger jobs on systems where data is larger than memory) this will be a surprising realization. In my case, I spent time trying to debug which compute tasks might be using more memory than expected only to eventually realize it was just the persist call which failed. Once I re-created the tables w/ persist=False, my workflow completed successfully.
I am sorry to hear that this caused you problems! I do definitely see your reasons, let me give you my rationale, when I created this default:
I assumed users will create a table once and then maybe do multiple queries on it. Persisting the content will speed up the process.
data will be loaded at the moment they call create_table. If it changes later, they won't notice (which I assumed seemed reasonable).
I do not have any problem with changing the default if my assumptions are wrong here. But maybe it would also be ok to mention it better in the documentation? @rajagurunath, what do you think?
Sorry for being late here, persist =True|False both have equal weights in my opinion, and agreed with both the points mentioned above.
ETL - needs to create a table eagerly (on demand) and pull the latest data every time instead of persisting the table in cluster RAM
Dashboard| BI tools - may benefit from using already created /cached tables to retrieve the data quickly.
One more thing I can think of, but not sure if it is really useful or not, can we allow the following set statements for setting the config globally
set create.table.presist = true;
As of now, making persist= False similar to frameworks like a spark and load the data whenever needed eagerly by specifying configs like persist = True in ETL pipeline, seems like a better solution and as mentioned by @nils-braun we will document this change.
A last thought in support of making persist=False by default is Dask DataFrame also does not persist unless explicitly asked by the user. Since Dask SQL users are likely Dask users, persisting only when specified would be most consistent.
That @randerzander convinces me most :-)
Ok, I am now also in favour of changing the default. (if @rajagurunath is not against it). Would you like to do it @randerzander or shall we proceed?
Activity
nils-braun commentedon Aug 18, 2021
I am sorry to hear that this caused you problems! I do definitely see your reasons, let me give you my rationale, when I created this default:
create_table. If it changes later, they won't notice (which I assumed seemed reasonable).I do not have any problem with changing the default if my assumptions are wrong here. But maybe it would also be ok to mention it better in the documentation? @rajagurunath, what do you think?
rajagurunath commentedon Aug 22, 2021
Sorry for being late here,
persist =True|Falseboth have equal weights in my opinion, and agreed with both the points mentioned above.One more thing I can think of, but not sure if it is really useful or not, can we allow the following
setstatements for setting the config globallyAs of now, making
persist= Falsesimilar to frameworks like a spark and load the data whenever needed eagerly by specifying configs like persist = True in ETL pipeline, seems like a better solution and as mentioned by @nils-braun we will document this change.Any other ideas/suggestions @nils-braun @randerzander?
randerzander commentedon Aug 23, 2021
A last thought in support of making
persist=Falseby default is Dask DataFrame also does not persist unless explicitly asked by the user. Since Dask SQL users are likely Dask users, persisting only when specified would be most consistent.nils-braun commentedon Aug 23, 2021
That @randerzander convinces me most :-)
Ok, I am now also in favour of changing the default. (if @rajagurunath is not against it). Would you like to do it @randerzander or shall we proceed?