Skip to content

Docs: PostgreSql integration #78

@mobley-trent

Description

@mobley-trent

Apache Iceberg version

0.5.0 (latest release)

Please describe the bug 🐞

Python = 3.11
PostgreSql = v16

I'm having issues setting up the initial connection to postgresql. I'm trying to run the code in the docs but I'm getting this error:

sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "iceberg_tables" does not exist
LINE 2: FROM iceberg_tables
             ^

This is my code:

catalog = load_catalog(
    "demo",
    **{
        "type": "sql",
        "uri": "postgresql+psycopg2://[username]:[passwd]@localhost/demo"
    }
)

catalog.create_namespace("docs_example")

This is the .pyiceberg.yaml file:

catalog:
  demo:
    type: sql
    uri: postgresql+psycopg2://[username]:[passwd]@localhost/demo

demo is the name of the database I'm using, it has a table named students which I'm trying to access.
I've attached the full stack trace for your review.
stack_trace_iceberg.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions