3 ms·
> Why would you bother using a database like clickhouse to store data if you're just going to analyze it in pandas? Because I have more data than what fits loc
by FridgeSeal 7y ago
> Why would you bother using a database like clickhouse to store data if you're just going to analyze it in pandas?
Because I have more data than what fits locally, there’s a data pipeline that pushes more in, and I only need to work on a subset.
Storing everything in flat csv/parquet etc is useless when there’s more than fits on your local/single machine memory or if you want to search/subset etc some of the data or do anything that’s larger than memory without having to write spill-to-disk stuff in Python/pandas.
- meritt 7y agoWhere did I suggest storing the data on a local machine? Common usage when using pandas/spark/etc is storing source data in parquet/orc/etc and they fully support data partitioning. That doesn't need to come from a local machine by any means. My bigger point to the OP was why bother using a DBMS that is specifically tuned for running fast analytical queries if they only intended to use it as a storage layer and pushing all of the analysis into Python. Use a solution focused on storage, not analysis, if that's the use case.
- FridgeSeal 7y agoBecause the more that you can offload onto the database means less people re-inventing from first principles every time they need to do something (and potentially making correctness mistakes). Additionally, if I have my data in an actual database, I can attach tools like Tableau and Superset directly, as opposed to having to take it from storage and then put it in a database anyway before being able to visualise/use it.
- meritt 7y agoYou misinterpret my comment as being against databases, when in fact I'm simply against the notion of utilizing a purpose-built OLAP database (Clickhouse) merely as the storage layer for yet another analytical platform (Pandas). In this hypothetical scenario, before the data ever makes it into Clickhouse, there's a very high likelihood it would already live in an OLTP database such as Postgres or perhaps parquet files living on S3 designed to be read by Athena or Redshift Spectrum etc.