Taking Aim At The Legacy Of SQL With The Preql Relational Language

The Python Podcast.__init__

Episode | Podcast

Date: Tue, 27 Jul 2021 22:00:00 -0400

<div class="wp-block-jetpack-markdown"><h2>Summary</h2> <p>SQL has gone through many cycles of popularity and disfavor. Despite its longevity it is objectively challenging to work with in a collaborative and composable manner. In order to address these shortcomings and build a new interface for your database oriented workloads Erez Shinan created Preql. It is based on the same relational algebra that inspired SQL, but brings in more robust computer science principles to make it more manageable as you scale in complexity. In this episode he shares his motivation for creating the Preql project, how he has used Python to develop a new language for interacting with database engines, and the challenges of taking on the legacy of SQL as an individual.</p> <h2>Announcements</h2> <ul> <li>Hello and welcome to Podcast.__init__, the podcast about Python&#8217;s role in data and science.</li> <li>When you&#8217;re ready to launch your next app or want to try a project you hear about on the show, you&#8217;ll need somewhere to deploy it, so take a look at our friends over at Linode. With the launch of their managed Kubernetes platform it&#8217;s easy to get started with the next generation of deployment and scaling, powered by the battle tested Linode platform, including simple pricing, node balancers, 40Gbit networking, dedicated CPU and GPU instances, and worldwide data centers. Go to <a href="https://www.pythonpodcast.com/linode?utm_source=rss&amp;utm_medium=rss">pythonpodcast.com/linode</a> and get a $100 credit to try out a Kubernetes cluster of your own. And don&#8217;t forget to thank them for their continued support of this show!</li> <li>Your host as usual is Tobias Macey and today I&#8217;m interviewing Erez Shinan about Preql, an interpreted, relational programming language, that specializes in database queries</li> </ul> <h2>Interview</h2> <ul> <li>Introductions</li> <li>How did you get introduced to Python?</li> <li>Can you describe what Preql is and the story behind it? <ul> <li>What are goals and target use cases for the project?</li> </ul> </li> <li>There have been numerous projects that aim to make SQL more maintainable and composable. What is it about the language and syntax that makes it so challenging? <ul> <li>How does Preql approach this problem that is different from other efforts? (e.g. ORMs, dbt-style Jinja, PyPika)</li> </ul> </li> <li>How did you approach the design of the syntax to make it familiar to people who know SQL?</li> <li>Can you describe how Preql is implemented? <ul> <li>How has the design and architecture changed or evolved since you began working on it?</li> </ul> </li> <li>What is a typical workflow for someone using Preql to build a library of analytical queries?</li> <li>Beyond strict compilation to SQL, what are some of the other features that you have incorporated into Preql? <ul> <li>How does a Preql program get executed against a target database, particularly when using capabilities that can&#8217;t be directly translated to SQL?</li> </ul> </li> <li>** What are the main difficulties / challenges of compiling to SQL ?</li> <li>What are some of the features or use cases that are not immediately obvious or prone to be overlooked that you think are worth mentioning?</li> <li>What are the most interesting, innovative, or unexpected ways that you have seen Preql used?</li> <li>What are the most interesting, unexpected, or challenging lessons that you have learned while working on Preql?</li> <li>When is Preql the wrong choice?</li> <li>What do you have planned for the future of Preql?</li> </ul> <h2>Keep In Touch</h2> <ul> <li><a href="https://github.com/erezsh?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">erezsh</a> on GitHub</li> <li><a href="https://twitter.com/erezsh?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">erezsh</a> on Twitter</li> </ul> <h2>Picks</h2> <ul> <li>Tobias <ul> <li><a href="https://www.imdb.com/title/tt4643084/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Counterpart</a></li> </ul> </li> <li>Erez <ul> <li><a href="https://visit-bansko.bg/en/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Bansko, Bulgaria</a></li> </ul> </li> </ul> <h2>Closing Announcements</h2> <ul> <li>Thank you for listening! Don&#8217;t forget to check out our other show, the <a href="https://feeds.fireside.fm/pythonpodcast/rss">Data Engineering Podcast</a> for the latest on modern data management.</li> <li>Visit the <a href="https://www.pythonpodcast.com?utm_source=rss&amp;utm_medium=rss">site</a> to subscribe to the show, sign up for the mailing list, and read the show notes.</li> <li>If you&#8217;ve learned something or tried out a project from the show then tell us about it! Email <a href="mailto:hosts@podcastinit.com">hosts@podcastinit.com</a>) with your story.</li> <li>To help other people find the show please leave a review on <a href="https://itunes.apple.com/us/podcast/podcast.-init/id981834425?mt=2&amp;uo=6&amp;at=&amp;ct=&amp;utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">iTunes</a> and tell your friends and co-workers</li> <li>Join the community in the new Zulip chat workspace at <a href="https://www.pythonpodcast.com/chat?utm_source=rss&amp;utm_medium=rss">pythonpodcast.com/chat</a></li> </ul> <h2>Links</h2> <ul> <li><a href="https://github.com/erezsh/Preql?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Preql</a></li> <li><a href="https://github.com/lark-parser/lark?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Lark</a></li> <li><a href="https://www.postgresql.org/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Postgres</a> <ul> <li><a href="https://www.dataengineeringpodcast.com/postgresql-with-jonathan-katz-episode-42/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Data Engineering Podcast Episode</a></li> </ul> </li> <li><a href="https://www.mysql.com/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">MySQL</a></li> <li><a href="https://en.wikipedia.org/wiki/Relational_algebra?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Relational Algebra</a></li> <li><a href="https://pandas.pydata.org/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Pandas</a> <ul> <li><a href="https://www.pythonpodcast.com/episode-98-pandas-with-jeff-reback/?utm_source=rss&amp;utm_medium=rss">Podcast Episode</a></li> </ul> </li> <li><a href="https://en.wikipedia.org/wiki/Object%E2%80%93relational_mapping?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">ORM == Object Relational Mapper</a></li> <li><a href="https://www.getdbt.com/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">dbt</a> <ul> <li><a href="https://www.dataengineeringpodcast.com/dbt-data-analytics-episode-81/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Data Engineering Podcast Episode</a></li> </ul> </li> <li><a href="https://github.com/kayak/pypika?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">PyPika</a></li> <li><a href="https://graphql.org/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">GraphQL</a></li> <li><a href="https://julialang.org/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Julia</a></li> <li><a href="https://github.com/erezsh/runtype?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">runtype</a></li> <li><a href="https://github.com/willmcgugan/rich?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Rich</a> terminal UI library</li> <li><a href="https://python-prompt-toolkit.readthedocs.io/en/master/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">prompt-toolkit</a></li> <li><a href="https://duckdb.org/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">DuckDB</a></li> <li><a href="https://github.com/askgitdev/askgit?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Askgit</a></li> <li><a href="https://cloud.google.com/bigquery?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">BigQuery</a></li> <li><a href="https://www.snowflake.com/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Snowflake</a></li> </ul> <p>The intro and outro music is from Requiem for a Fish <a href="http://freemusicarchive.org/music/The_Freak_Fandango_Orchestra/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">The Freak Fandango Orchestra</a> / <a href="http://creativecommons.org/licenses/by-sa/3.0/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">CC BY-SA</a></p> </div> <img alt="" height="0" src="https://analytics.boundlessnotions.com/piwik.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fwww.pythonpodcast.com%2Fpreql-relational-algebra-sql-replacement-episode-325%2F&amp;action_name=Taking+Aim+At+The+Legacy+Of+SQL+With+The+Preql+Relational+Language+-+Episode+325&amp;urlref=https%3A%2F%2Fwww.pythonpodcast.com%2Ffeed%2F&amp;utm_source=rss&amp;utm_medium=rss" style="border: 0; width: 0; height: 0;" width="0" />