airbytehq / PyAirbyte

PyAirbyte brings the power of Airbyte to every Python developer.
https://docs.airbyte.com/pyairbyte
Other
234 stars 41 forks source link

(duckdb.duckdb.CatalogException) Catalog Error: Type with name REGCLASS does not exist! #423

Closed ZmeiGorynych closed 1 month ago

ZmeiGorynych commented 1 month ago

When running the code below, I get the following error towards the very end:

[SQL: SELECT pg_catalog.pg_class.relname, pg_catalog.pg_description.description 
FROM pg_catalog.pg_class LEFT OUTER JOIN pg_catalog.pg_description ON pg_catalog.pg_class.oid = pg_catalog.pg_description.objoid AND pg_catalog.pg_description.objsubid = $1 AND pg_catalog.pg_description.classoid = CAST($2 AS REGCLASS) JOIN pg_catalog.pg_namespace ON pg_catalog.pg_namespace.oid = pg_catalog.pg_class.relnamespace 
WHERE pg_catalog.pg_class.relkind = ANY (ARRAY[$3, $4, $5, $6, $7]) AND pg_catalog.pg_table_is_visible(pg_catalog.pg_class.oid) AND pg_catalog.pg_namespace.nspname != $8 AND pg_namespace.nspname = $9 AND pg_catalog.pg_class.relname IN ($10)]
[parameters: (0, 'pg_catalog.pg_class', 'r', 'p', 'f', 'v', 'm', 'pg_catalog', 'main', 'channel_members')]

Running on Windows 10, Python 3.11, fresh install of airbyte with pip. Full console output attached slack-connector-console-output3.txt

import airbyte as ab

source = ab.get_source(
    "source-slack",
    config={
        "api_token": "mytoken",
        "start_date": "2024-10-14T00:00:00Z",
        "lookback_window": 1,
        "join_channels": True,  # Will auto-join all channels the bot has access to
        # "channel_filter": ["test-slack-ingestion"],
    },
    install_if_missing=True,
)
source.check()
source.select_streams(
    [
        "channels",

        "channel_members",
        "channel_messages",
        # "threads",
    ]
)

result = source.read()
guenp commented 1 month ago

As a workaround you can downgrade to sqlalchemy 2.0.35

pip install SQLAlchemy==2.0.35

see also https://github.com/Mause/duckdb_engine/issues/1128

ZmeiGorynych commented 1 month ago

That fixed it, thanks!

aaronsteers commented 1 month ago

Resolved this morning in v0.19.0. Thanks, @guenp for sending over the PR. 🙏