GithubHelp home page GithubHelp logo

Comments (2)

benrutter avatar benrutter commented on May 29, 2024

Is this still an issue for you? Does the same thing happen on the latest version of dask or is it just 2023.11?

Also, what versions of pandas + sqlalchemy are in your environment?

from dask.

frbelotto avatar frbelotto commented on May 29, 2024

I´ve just tested against the latests versions :

dask:2024.4.1
pandas:2.2.2
sqla : 2.0.29
import pandas as pd
sql = """SELECT t1.NR_SEQL_SLCT_CPR
        FROM ORANDPOW0000.SLCT_CPR_PRD_PCR t1
        WHERE ROWNUM <= 1000"""
pd.read_sql(sql = sql, con=oracle.uri, index_col = 'nr_seql_slct_cpr')

image

import dask.dataframe as dd
sql = """SELECT t1.NR_SEQL_SLCT_CPR
        FROM ORANDPOW0000.SLCT_CPR_PRD_PCR t1
        WHERE ROWNUM <= 1000"""
dd.read_sql(sql = sql, con=oracle.uri, index_col = 'nr_seql_slct_cpr')

---------------------------------------------------------------------------
NoSuchTableError                          Traceback (most recent call last)
Cell In[15], [line 5](vscode-notebook-cell:?execution_count=15&line=5)
      [1](vscode-notebook-cell:?execution_count=15&line=1) import dask.dataframe as dd
      [2](vscode-notebook-cell:?execution_count=15&line=2) sql = """SELECT t1.NR_SEQL_SLCT_CPR
      [3](vscode-notebook-cell:?execution_count=15&line=3)         FROM ORANDPOW0000.SLCT_CPR_PRD_PCR t1
      [4](vscode-notebook-cell:?execution_count=15&line=4)         WHERE ROWNUM <= 1000"""
----> [5](vscode-notebook-cell:?execution_count=15&line=5) dd.read_sql(sql = sql, con=oracle.uri, index_col = 'nr_seql_slct_cpr')

File [c:\Users\fabio\AppData\Local\Programs\Python\Python311\Lib\site-packages\dask_expr\io\sql.py:7](file:///C:/Users/fabio/AppData/Local/Programs/Python/Python311/Lib/site-packages/dask_expr/io/sql.py:7), in read_sql(sql, con, index_col, **kwargs)
      [4](file:///C:/Users/fabio/AppData/Local/Programs/Python/Python311/Lib/site-packages/dask_expr/io/sql.py:4) def read_sql(sql, con, index_col, **kwargs):
      [5](file:///C:/Users/fabio/AppData/Local/Programs/Python/Python311/Lib/site-packages/dask_expr/io/sql.py:5)     from dask.dataframe.io.sql import read_sql
----> [7](file:///C:/Users/fabio/AppData/Local/Programs/Python/Python311/Lib/site-packages/dask_expr/io/sql.py:7)     df = read_sql(sql, con, index_col, **kwargs)
      [8](file:///C:/Users/fabio/AppData/Local/Programs/Python/Python311/Lib/site-packages/dask_expr/io/sql.py:8)     return from_legacy_dataframe(df)

File [c:\Users\fabio\AppData\Local\Programs\Python\Python311\Lib\site-packages\dask\dataframe\io\sql.py:394](file:///C:/Users/fabio/AppData/Local/Programs/Python/Python311/Lib/site-packages/dask/dataframe/io/sql.py:394), in read_sql(sql, con, index_col, **kwargs)
    [361](file:///C:/Users/fabio/AppData/Local/Programs/Python/Python311/Lib/site-packages/dask/dataframe/io/sql.py:361) """
    [362](file:///C:/Users/fabio/AppData/Local/Programs/Python/Python311/Lib/site-packages/dask/dataframe/io/sql.py:362) Read SQL query or database table into a DataFrame.
    [363](file:///C:/Users/fabio/AppData/Local/Programs/Python/Python311/Lib/site-packages/dask/dataframe/io/sql.py:363) 
   (...)
    [391](file:///C:/Users/fabio/AppData/Local/Programs/Python/Python311/Lib/site-packages/dask/dataframe/io/sql.py:391) read_sql_query : Read SQL query into a DataFrame.
    [392](file:///C:/Users/fabio/AppData/Local/Programs/Python/Python311/Lib/site-packages/dask/dataframe/io/sql.py:392) """
    [393](file:///C:/Users/fabio/AppData/Local/Programs/Python/Python311/Lib/site-packages/dask/dataframe/io/sql.py:393) if isinstance(sql, str):
--> [394](file:///C:/Users/fabio/AppData/Local/Programs/Python/Python311/Lib/site-packages/dask/dataframe/io/sql.py:394)     return read_sql_table(sql, con, index_col, **kwargs)
    [395](file:///C:/Users/fabio/AppData/Local/Programs/Python/Python311/Lib/site-packages/dask/dataframe/io/sql.py:395) else:
...
   [1541](file:///C:/Users/fabio/AppData/Local/Programs/Python/Python311/Lib/site-packages/sqlalchemy/engine/reflection.py:1541) if _reflect_info.table_options:

NoSuchTableError: SELECT t1.NR_SEQL_SLCT_CPR
        FROM ORANDPOW0000.SLCT_CPR_PRD_PCR t1
        WHERE ROWNUM <= 1000
Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?43003cc2-5504-4dc1-91ab-a6d2b9db8d10) or open in a [text editor](command:workbench.action.openLargeOutput?43003cc2-5504-4dc1-91ab-a6d2b9db8d10). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...

from dask.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.