Skip to main content
2 votes
1 answer
75 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() ...
Raoua's user avatar
  • 59
0 votes
1 answer
55 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 ...
SAMIBOIII's user avatar
0 votes
1 answer
222 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 ...
WannabeDev's user avatar
0 votes
0 answers
85 views

I want to extract table and its associated columns from a query in Python

The expected output should be based on outer main query and subquery like below: Table: A_MPAY_BUKDB.ACC_SWITCHING Columns from main query: MI_KEY_ACC_SWITCHING, CURRENCY, DEPARTMENT, ...
Rajdeep's user avatar
  • 21
1 vote
0 answers
60 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....
8oris's user avatar
  • 475
0 votes
0 answers
119 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 ...
Kamran Maharramli's user avatar
-1 votes
1 answer
218 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 ...
Zendoc's user avatar
  • 11
0 votes
2 answers
174 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 ...
Zoi K.'s user avatar
  • 431
0 votes
0 answers
51 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 //...
Xiaobo Jia's user avatar
1 vote
1 answer
148 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 ...
Raoua's user avatar
  • 59
0 votes
0 answers
68 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 ...
Heisen's user avatar
  • 43
0 votes
0 answers
103 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', ...
X.Kevin's user avatar
0 votes
1 answer
136 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 ...
Varun Rajput's user avatar
0 votes
0 answers
83 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%-%'&...
shivam pandita's user avatar
1 vote
1 answer
439 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 ...
schemanic's user avatar

15 30 50 per page
1
2 3 4 5
10