question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Query builder / providing SQL clauses to the dialect

See original GitHub issue

Overview

I’m working on a very similar project, which is a DEVT framework, like frictionless-py, but with focus on open government data.

Instead of reinventing the wheel, I decided to do an experiment integrating frictionless-py. So far it worked pretty well with “Describe” part, but I’m not sure if frictionless-py has a good support for data filtering.

As I understand currently filtering is provided by transformations, for example there is a Filter Rows. I don’t fully understand, how that works, what is <formula> and more important how it is implemented under the hood.

I will have to deal with very large tables, so it is important to know, that filtering happens at SQL database level, not on python level. If filtering will be done on Python, then it will take forever to complete.

Also, same thing applies to joins. Are joins performed on SQL database level, or frictionless-py loads everything into memory and does joins on Python side?


Please preserve this line to notify @roll (lead of this repository)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
n0rdlichtcommented, Jul 16, 2021

@n0rdlicht It looks good! Are you interested in PRing it? Also ccying @alexkreidler

very much. Started playing around, looks like the basics should be easy to add within the current structure. Will give it a try and do a PR.

1reaction
rollcommented, Jan 25, 2021

@sirex Spinta is really interesting! (cc @lwinfree)

Under the hood of all the transformation, we use a battle-tested PETL framework - https://petl.readthedocs.io/en/stable/ - https://frictionlessdata.github.io/frictionless-py/docs/guides/transforming-data. Usually, it guarantees that memory is treated properly e.g. for big data it will buffer it using the disc etc. More about transform in Frictionless - https://frictionlessdata.github.io/frictionless-py/docs/guides/transforming-data

Another question, that’s true that performance might be an issue for very large data if we compare it to pure SQL. ATM I see two main options to resolve it if you need a declarative was on the frictionless level:

If you don’t need it to be fully declarative we can just add some sqlalchemy options like built query as an option to SQL Storage

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introduction to query expressions—ArcGIS Pro | Documentation
All query expressions in ArcGIS Pro use Structured Query Language (SQL) to formulate these search specifications. The query builder is used to construct...
Read more >
SQL Query Builder - DBAL - Doctrine
SQL Query Builder. Doctrine features a powerful query builder for the SQL language. This QueryBuilder object has methods to add parts to an...
Read more >
Building Queries with Query Builder - Oracle Help Center
Using Query Builder, you can search and filter database objects, select objects and columns, create relationships between objects, view formatted query results, ...
Read more >
Query Builder - Laravel - The PHP Framework For Web Artisans
Laravel's database query builder provides a convenient, fluent interface to creating and running database queries. It can be used to perform most database ......
Read more >
Dialect: Cross-Vendor & Cross-Platform SQL Query ... - GitHub
It is very easy, intuitive and powerful to produce sql code for an arbitrary SQL vendor, by defining the grammar of sql clauses...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found