150 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
Best practices
0
votes
1
replies
102
views
Oracle TRUNC(date) vs PostgreSQL TRUNC(numeric) behavior in jOOQ (3.19.6) — better approach than rewriting via parserListener?
I'm currently working on a migration from Oracle Database to PostgreSQL using jOOQ (version 3.19.6), and I’ve run into a behavioral difference with the TRUNC function.
Problem
In Oracle, TRUNC is ...
- reputation score 61
Score of 2
1 answer
144 views
jOOQ removes SQL inside ignore comments during execution
I'm using jOOQ with PostgreSQL and want to execute a query with an EXPLAIN (ANALYZE, FORMAT JSON) prefix.
I set the parser settings to ignore comments:
Settings settings = new Settings()
...
- reputation score 61
Score of 0
1 answer
86 views
Does sqlparse.token.keyword recognize Top as a keyword?
I'm trying this code where I want to convert T-SQL to databricks-SQL and I'm trying to change only the uncommon by first defining the common keywords and check it against the parsed list. I want the ...
- reputation score 11
Score of 0
1 answer
409 views
Parsing Complex SQL Statements to Map Columns, Tables, Databases Being Queried
I have been trying to create a python script that will parse some pretty complex SQL and return a dataframe of all of the columns, tables, and databases being queried as well as section indicators of ...
- reputation score 31
Score of 1
0 answers
86 views
Parsing SQL queries and get select and where clauses using Microsoft.SqlServer.Management.SqlParser
I tried to parse SQL queries using Microsoft.SqlServer.Management.SqlParser librairies.
I didn't find any complete (or updated topics) documentation about it.
So far, here's my code:
Imports Microsoft....
- reputation score 469
Score of 0
0 answers
138 views
How to expand * into columns with given query and table with column list
I'm writing a code to expand a SELECT query that uses * or alias.* into SELECT query with defined column names.
The idea is to supply the query, table list and associated column list and return a ...
- reputation score 21
Score of -1
1 answer
253 views
Pinotdb error (pinotdb.exceptions.DatabaseError) {'errorCode': 150... when trying to initialize apache-pinot db from apache-superset
while setting up Apache-Superset (I installed Superset on Ubuntu 22.04 over pypi, for the connector im using pinotdb, to connect Superset to a apache-pinot db.) i encountered following error after ...
- reputation score 11
Score of 0
2 answers
186 views
Parse Google BQ SQL queries and get all tables referenced
In a console Google Cloud project I have several datasets with tables/views in them, so most of them have the query from which they came. I am trying to parse every single one of them to get their ...
- reputation score 441
Score of 0
0 answers
65 views
How can i generate the Flex&Bison target by CMake?
i was writing a sql parser, i use cmake configure my project.
source code directories are as follows:
├── build
├── CMakeLists.txt // root CMakeLists.txt
└── src
├── CMakeLists.txt //...
- reputation score 1
Score of 1
1 answer
185 views
Parsing Issue with jOOQ when Using Alias on Oracle's DUAL Table
I recently encountered a parsing issue while using jOOQ to parse SQL queries containing Oracle's DUAL table with an alias. Here's a simplified version of the query that reproduces the issue:
private ...
- reputation score 61
Score of 0
0 answers
71 views
Checking if SQL Query Output Will Be Ordered Based on `ORDER BY` Clause
I'm working on a project where I need to parse SQL queries and determine if the final SQL output will be ordered or not. I am checking based on the presence of an ORDER BY clause.
Here's what I've ...
- reputation score 43
Score of 0
0 answers
113 views
Python sqlparse _ New line after ( in subquery
I am using " https://github.com/andialbrecht/sqlparse/discussions/761 "
My invoke program is
"
print(sqlparse.format(first, reindent=True, keyword_case='upper', ofrmt='python', ...
- reputation score 1
Score of 0
1 answer
159 views
How to get table & their alias names using Microsoft ScriptDom library
Hi I am using Microsoft ScriptDOM parser (Microsoft.SqlServer.TransactSql.ScriptDom) to parse the SQL queries.
For a decision making in my logic I want to know all the table names and their alias in a ...
- reputation score 63
Score of 0
0 answers
88 views
Unable to use _ when doing get_partitions Boto3 call for filtering partitions by using Expression param
I cannot use _ when doing get_partitions Boto3 call for filtering partitions by using Expression parameter:
response = client.get_partitions(
Expression="partition_name LIKE '%_20231202%-%'&...
- reputation score 112
Score of 1
1 answer
470 views
python sqlparse - WHERE clause eats custom keywords
I'm working with sqlparse and defining my own custom keywords for the dialect I'm using, but I'm noticing that if my keyword 'FACET' appears after my WHERE clause, it gets grouped into the WHERE's ...
- reputation score 99