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

SQL Error [42883]: ERROR: function read_json(unknown) does not exist Hint: No function matches the given name and argument types #552

Open
2 tasks done
lgonzalezsa opened this issue Jan 22, 2025 · 1 comment
Labels
needs-info Needs more info, unless provided this will be closed "soon"

Comments

@lgonzalezsa
Copy link

What happens?

Trying to read local JSON files but getting the error in the title.

To Reproduce

Using docker compose example from the repo, connecting to the postgres DB and checking able to read parquet files and all good there.
When changing to the folder I have JSON files, getting the error

SQL Error [42883]: ERROR: function read_json(unknown) does not exist
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Position: 55

with trace_json as (
select FWInformation from read_json('/var/lib/postgresql/local_data/sample.json.ready') as (FWInformation text)
)
select FWInformation from trace_json 
limit 10

OS:

Linux

pg_duckdb Version (if built from source use commit hash):

0.2.0

Postgres Version (if built from source use commit hash):

16.4

Hardware:

No response

Full Name:

Luis Rolando Gonzalez

Affiliation:

HPE

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?

Yes

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configuration (e.g., CPU architecture, Linux distribution) to reproduce the issue?

  • Yes, I have
@JelteF
Copy link
Collaborator

JelteF commented Jan 28, 2025

That error means that the read_json function cannot be found at all. Which can happen for a few reasons:

  1. You did not use pg_duckdb v0.2.0 (but v0.1.0). Can you share the docker command you used?
  2. You did not run CREATE EXTENSION pg_duckdb (normally this should be done automatically by the docker container). Can you share the output of \dx
  3. The schema in which the pg_duckdb extension is installed is not in your search_path. By default that schema is public. Can you share the output of SHOW search_path.

@JelteF JelteF added the needs-info Needs more info, unless provided this will be closed "soon" label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-info Needs more info, unless provided this will be closed "soon"
Projects
None yet
Development

No branches or pull requests

2 participants