Discussion:
[xquery-talk] using FLWOR expressions (aka SQL..) directly in Python
daniela florescu
2016-10-21 17:13:45 UTC
Permalink
For all exasperated data scientists writing mind bending, complicated Python scrips to process their data: the power of complex,
yet familiar, compact and optimizable SQL queries directly in Python, running on structured as well as unstructured data (XML, JSON).

http://www.pythonql.org <http://www.pythonql.org/>

Well, actually it’s not SQL per se. It’s the better, cleaner and more powerful version of SELECT-FROM-WHERE,
. its the
power of XQuery’s FLWOR expressions, directly usable as an expression in Python — together with any other expected goodies,
complex path expressions, etc.

Enjoy.

Best regards
Dana
Ihe Onwuka
2016-10-21 17:46:57 UTC
Permalink
Is the big thing here integration with the Python ecosystem?
Otherwise what is this offering to people who are not XQueryphobic.
Post by daniela florescu
For all exasperated data scientists writing mind bending, complicated
Python scrips to process their data: the power of complex,
yet familiar, compact and optimizable SQL queries directly in Python,
running on structured as well as unstructured data (XML, JSON).
http://www.pythonql.org
Well, actually it’s not SQL per se. It’s the better, cleaner and more
powerful version of SELECT-FROM-WHERE,
. its the
power of XQuery’s FLWOR expressions, directly usable as an expression in
Python — together with any other expected goodies,
complex path expressions, etc.
Enjoy.
Best regards
Dana
_______________________________________________
http://x-query.com/mailman/listinfo/talk
daniela florescu
2016-10-21 17:59:03 UTC
Permalink
Ihe,

Based on my experience, lots of data processing people use Python those days, yet they are not helped
much by the available tools in their ecosystem.

PythonQL is to Python what LinQ was to C#, that’s all.

A simple and more natural way to run queries directly integrated in your normal programming and
a replacement to the horrible scripts that most people need to write today for data manipulation.

Now, is this “XQuery" !? Nope.

The FLWOR expressions of XQuery have nothing to do with XML, neither syntactically, nor semantically.

They are just a generalized, cleaner and more powerful form of data comprehension , out of which SQL’s SELECT-FROM-WHERE
is an example, but not the only one. (Python has it’s now form of comprehension for example).

In fact in PhytonQL we tried to avoid what we perceived as serious problems with the adoption of XQuery.

For example we made the following syntactic choices (good or bad, we’ll see
):

1. FOR and FROM are synonyms. Choose whatever you like the best
..
2. IF and WHERE are synonyms. Again, choose whatever you like the best
..
3. We avoided the (over)loaded RETURN keyword of XQuery and called it SELECT like in SQL.
4. We put the SELECT clause first, like in SQL.

But other then this, it’s just 100% FLWOr expression, with windowing, grouping, etc.

Does this make sense ?

Best regards
Dana
Post by Ihe Onwuka
Is the big thing here integration with the Python ecosystem?
Otherwise what is this offering to people who are not XQueryphobic.
For all exasperated data scientists writing mind bending, complicated Python scrips to process their data: the power of complex,
yet familiar, compact and optimizable SQL queries directly in Python, running on structured as well as unstructured data (XML, JSON).
http://www.pythonql.org <http://www.pythonql.org/>
Well, actually it’s not SQL per se. It’s the better, cleaner and more powerful version of SELECT-FROM-WHERE,
. its the
power of XQuery’s FLWOR expressions, directly usable as an expression in Python — together with any other expected goodies,
complex path expressions, etc.
Enjoy.
Best regards
Dana
_______________________________________________
http://x-query.com/mailman/listinfo/talk <http://x-query.com/mailman/listinfo/talk>
Ihe Onwuka
2016-10-21 18:15:29 UTC
Permalink
It answers my question.

I would like to see how this goes down in the Python community so do you
have links to blogs and stuff where the announcement has been made.

My 2 cents would have been to release and not mention anything about XQuery
or JSONiq
Post by daniela florescu
Ihe,
Based on my experience, lots of data processing people use Python those
days, yet they are not helped
much by the available tools in their ecosystem.
PythonQL is to Python what LinQ was to C#, that’s all.
A simple and more natural way to run queries directly integrated in your
normal programming and
a replacement to the horrible scripts that most people need to write today
for data manipulation.
Now, is this “XQuery" !? Nope.
The FLWOR expressions of XQuery have nothing to do with XML, neither
syntactically, nor semantically.
They are just a generalized, cleaner and more powerful form of data
comprehension , out of which SQL’s SELECT-FROM-WHERE
is an example, but not the only one. (Python has it’s now form of
comprehension for example).
In fact in PhytonQL we tried to avoid what we perceived as serious
problems with the adoption of XQuery.
1. FOR and FROM are synonyms. Choose whatever you like the best
..
2. IF and WHERE are synonyms. Again, choose whatever you like the best
..
3. We avoided the (over)loaded RETURN keyword of XQuery and called it SELECT like in SQL.
4. We put the SELECT clause first, like in SQL.
But other then this, it’s just 100% FLWOr expression, with windowing, grouping, etc.
Does this make sense ?
Best regards
Dana
Is the big thing here integration with the Python ecosystem?
Otherwise what is this offering to people who are not XQueryphobic.
Post by daniela florescu
For all exasperated data scientists writing mind bending, complicated
Python scrips to process their data: the power of complex,
yet familiar, compact and optimizable SQL queries directly in Python,
running on structured as well as unstructured data (XML, JSON).
http://www.pythonql.org
Well, actually it’s not SQL per se. It’s the better, cleaner and more
powerful version of SELECT-FROM-WHERE,
. its the
power of XQuery’s FLWOR expressions, directly usable as an expression in
Python — together with any other expected goodies,
complex path expressions, etc.
Enjoy.
Best regards
Dana
_______________________________________________
http://x-query.com/mailman/listinfo/talk
Pavel Velikhov
2016-10-21 18:29:46 UTC
Permalink
Hi Ihe!


So we made just a small number of announcements and we actually forgot
about posting to some prominent

Python lists, like comp.lang.python. Thanks for the idea!


But so far the response was quite positive.

—pavel


On 21 Oct 2016, at 21:15, Ihe Onwuka <***@gmail.com> wrote:

It answers my question.

I would like to see how this goes down in the Python community so do you
have links to blogs and stuff where the announcement has been made.

My 2 cents would have been to release and not mention anything about XQuery
or JSONiq
Post by daniela florescu
Ihe,
Based on my experience, lots of data processing people use Python those
days, yet they are not helped
much by the available tools in their ecosystem.
PythonQL is to Python what LinQ was to C#, that’s all.
A simple and more natural way to run queries directly integrated in your
normal programming and
a replacement to the horrible scripts that most people need to write today
for data manipulation.
Now, is this “XQuery" !? Nope.
The FLWOR expressions of XQuery have nothing to do with XML, neither
syntactically, nor semantically.
They are just a generalized, cleaner and more powerful form of data
comprehension , out of which SQL’s SELECT-FROM-WHERE
is an example, but not the only one. (Python has it’s now form of
comprehension for example).
In fact in PhytonQL we tried to avoid what we perceived as serious
problems with the adoption of XQuery.
1. FOR and FROM are synonyms. Choose whatever you like the best
..
2. IF and WHERE are synonyms. Again, choose whatever you like the best
..
3. We avoided the (over)loaded RETURN keyword of XQuery and called it SELECT like in SQL.
4. We put the SELECT clause first, like in SQL.
But other then this, it’s just 100% FLWOr expression, with windowing, grouping, etc.
Does this make sense ?
Best regards
Dana
Is the big thing here integration with the Python ecosystem?
Otherwise what is this offering to people who are not XQueryphobic.
Post by daniela florescu
For all exasperated data scientists writing mind bending, complicated
Python scrips to process their data: the power of complex,
yet familiar, compact and optimizable SQL queries directly in Python,
running on structured as well as unstructured data (XML, JSON).
http://www.pythonql.org
Well, actually it’s not SQL per se. It’s the better, cleaner and more
powerful version of SELECT-FROM-WHERE,
. its the
power of XQuery’s FLWOR expressions, directly usable as an expression in
Python — together with any other expected goodies,
complex path expressions, etc.
Enjoy.
Best regards
Dana
_______________________________________________
http://x-query.com/mailman/listinfo/talk
_______________________________________________
***@x-query.com
http://x-query.com/mailman/listinfo/talk
daniela florescu
2016-10-21 18:49:26 UTC
Permalink
My 2 cents would have been to release and not mention anything about XQuery or JSONiq
Yes, Ihe, I think I agree :-))

People love to hate XQuery, and they have no idea why, and very often they don'tt even have an idea of what XQuery IS
before hating it
.but such is life.

I stopped trying to understand this fact
 sometimes things are just like that, and that’s it. Move on.

So nope, we’ll not say anything about XQuery in public :-)

Any similarity to between PytonQL and XQuery are totally fictitious
. :-))

Dana
Ihe,
Based on my experience, lots of data processing people use Python those days, yet they are not helped
much by the available tools in their ecosystem.
PythonQL is to Python what LinQ was to C#, that’s all.
A simple and more natural way to run queries directly integrated in your normal programming and
a replacement to the horrible scripts that most people need to write today for data manipulation.
Now, is this “XQuery" !? Nope.
The FLWOR expressions of XQuery have nothing to do with XML, neither syntactically, nor semantically.
They are just a generalized, cleaner and more powerful form of data comprehension , out of which SQL’s SELECT-FROM-WHERE
is an example, but not the only one. (Python has it’s now form of comprehension for example).
In fact in PhytonQL we tried to avoid what we perceived as serious problems with the adoption of XQuery.
1. FOR and FROM are synonyms. Choose whatever you like the best
..
2. IF and WHERE are synonyms. Again, choose whatever you like the best
..
3. We avoided the (over)loaded RETURN keyword of XQuery and called it SELECT like in SQL.
4. We put the SELECT clause first, like in SQL.
But other then this, it’s just 100% FLWOr expression, with windowing, grouping, etc.
Does this make sense ?
Best regards
Dana
Post by Ihe Onwuka
Is the big thing here integration with the Python ecosystem?
Otherwise what is this offering to people who are not XQueryphobic.
For all exasperated data scientists writing mind bending, complicated Python scrips to process their data: the power of complex,
yet familiar, compact and optimizable SQL queries directly in Python, running on structured as well as unstructured data (XML, JSON).
http://www.pythonql.org <http://www.pythonql.org/>
Well, actually it’s not SQL per se. It’s the better, cleaner and more powerful version of SELECT-FROM-WHERE,
. its the
power of XQuery’s FLWOR expressions, directly usable as an expression in Python — together with any other expected goodies,
complex path expressions, etc.
Enjoy.
Best regards
Dana
_______________________________________________
http://x-query.com/mailman/listinfo/talk <http://x-query.com/mailman/listinfo/talk>
daniela florescu
2016-10-21 20:01:25 UTC
Permalink
My 2 cents would have been to release and not mention anything about XQuery or JSONiq
Ihe, a more serious answer to your comment above.

XQuery was designed and adapted to query XML (together with XML Schema and the rest of the XML world, etc, etc)

JSONiq was designed to query JSON, and only JSON.

======

Unlike them, PythonQL is not attached to any particular data model or data format. I can query anything that can be
represented in the Python structures, e.g. tables, XML, JSON. It’s not data model specific.

What those three languages have in common is the use of the semantics of the FLWOR expression (not the syntax!).

The FLWOR expression is a general purpose data comprehension programing paradigm, not related to any data model or
data format.

SELECT-FROM-WHERE in SQL is just a simpler case of FLWOR expression.

Best regards
Dana

Loading...