Table with name does not exist

Open
#114 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
aws, python
Domain
databases

Research direction

Start by running the provided Python reproduction with DuckDB 1.4.1 and compare its conn.execute behavior with the equivalent DuckDB shell query. Trace the attach and table lookup entry points involved in the Python call, then verify that FROM s3_tables_db.core.product returns the same rows in both environments.

Written by the indexing model from the issue text.

Description

needs triage
What happens?

Hello, I am able to perform the following set of steps successfully using duckdb shell (cli) but it breaks when done via the python library.

INSTALL aws;
INSTALL httpfs;
INSTALL iceberg;

CREATE OR REPLACE SECRET (
    TYPE s3,
    PROVIDER credential_chain
);

ATTACH OR REPLACE 'arn:aws:s3tables:...:bucket/s3_table' AS s3_tables_db (
    TYPE iceberg,
    ENDPOINT_TYPE s3_tables
);

# This works from the shell
FROM s3_tables_db.core.product LIMIT 5;

Any help at all would be appreciated.

To Reproduce
import duckdb


conn = duckdb.connect()
conn.install_extension("aws")
conn.install_extension("httpfs")
conn.install_extension("iceberg")
conn.sql(
    """
        CREATE OR REPLACE SECRET (
            TYPE s3,
            PROVIDER credential_chain
        );
    """
)
conn.sql(
    """
        ATTACH OR REPLACE 'arn:aws:s3tables:...:bucket/s3_table' AS s3_tables_db (
            TYPE iceberg,
            ENDPOINT_TYPE s3_tables
        );
    """
)

# Works
x = conn.execute("show all tables;").fetchall()

# Errors out
y = conn.execute(
    """
    FROM s3_tables_db.core.product LIMIT 5;
    """
).fetchall()

Output

Exception has occurred: CatalogException
Catalog Error: Table with name product does not exist!
Did you mean "s3_tables_db.core.product"?
OS:

OSX

DuckDB Package Version:

1.4.1

Python Version:

3.12

Full Name:

Jibi Abraham

Affiliation:

Razor Group

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a stable release

Did you include all relevant data sets for reproducing the issue?

No - Other reason (please specify in the issue body)

Did you include all code required to reproduce the issue?
  • Yes, I have
Did you include all relevant configuration to reproduce the issue?
  • Yes, I have
Dominant language
Python
Stars
186
Forks
113
Avg merge
20h 58m
Merged PRs (30d)
11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from duckdb/duckdb-python

All issues in duckdb/duckdb-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.