Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: #7324

Open
2 of 3 tasks
SiRumCz opened this issue Jun 20, 2024 · 1 comment
Open
2 of 3 tasks

BUG: #7324

SiRumCz opened this issue Jun 20, 2024 · 1 comment
Labels
bug 🦗 Something isn't working Triage 🩹 Issues that need triage

Comments

@SiRumCz
Copy link

SiRumCz commented Jun 20, 2024

Modin version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest released version of Modin.

  • I have confirmed this bug exists on the main branch of Modin. (In order to do this you can follow this guide.)

Reproducible Example

...
# suppose I already have connection to a sqlite db with table named tabl1 and it has `id` attr.

df = pd.read_sql(sql='select * from table1 where id=:id', con=con, params={'id':'id1'})


### Issue Description

error is raised when I execute this.

### Expected Behavior

should give me correct result

### Error Logs

<details>

```python-traceback

sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) near "%": syntax error
[SQL: SELECT COUNT(*) FROM (select * from table1 where id=:id) AS _MODIN_COUNT_QUERY]
(Background on this error at: https://sqlalche.me/e/20/e3q8)

Installed Versions

INSTALLED VERSIONS

commit : 52fca1c
python : 3.9.17.final.0
python-bits : 64
OS : Linux
OS-release : 6.2.0-37-generic
Version : #38~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 2 18:01:13 UTC 2
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_CA.UTF-8
LOCALE : en_CA.UTF-8

Modin dependencies

modin : 0.30.1
ray : 2.24.0
dask : 2024.6.0
distributed : 2024.6.0
hdk : None

pandas dependencies

pandas : 2.2.2
numpy : 1.24.4
pytz : 2024.1
dateutil : 2.9.0.post0
setuptools : 70.0.0
pip : 24.0
Cython : None
pytest : 7.4.4
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.1.4
IPython : 8.18.1
pandas_datareader : None
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : 4.12.3
bottleneck : None
dataframe-api-compat : None
fastparquet : None
fsspec : 2024.6.0
gcsfs : None
matplotlib : 3.7.5
numba : None
numexpr : None
odfpy : None
openpyxl : 3.1.4
pandas_gbq : None
pyarrow : 16.1.0
pyreadstat : None
python-calamine : None
pyxlsb : None
s3fs : None
scipy : 1.10.1
sqlalchemy : 2.0.31
tables : None
tabulate : None
xarray : None
xlrd : None
zstandard : None
tzdata : 2024.1
qtpy : None
pyqt5 : None

@SiRumCz SiRumCz added bug 🦗 Something isn't working Triage 🩹 Issues that need triage labels Jun 20, 2024
@noloerino
Copy link
Collaborator

Hi @SiRumCz, is your issue that pd.read_sql is raising a syntax error with your query?

Can you see if your code works with vanilla (non-Modin) pandas? You might need to try different parameter syntax (https://peps.python.org/pep-0249/#paramstyle) to get your query to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🦗 Something isn't working Triage 🩹 Issues that need triage
Projects
None yet
Development

No branches or pull requests

2 participants