cldellow / datasette-parquet

Add DuckDB, Parquet, CSV and JSON lines support to Datasette
Apache License 2.0
45 stars 5 forks source link

not working in conjunction with datasette-graphql #18

Closed mnsrulz closed 1 year ago

mnsrulz commented 1 year ago

metadata.json

{
  "plugins": {
    "datasette-parquet": {
      "trove": {
        "directory": "/app/data",
        "watch": true
      }
    }
  }
}

run.sh

datasette --metadata /app/metadata.json -h 0.0.0.0 --setting sql_time_limit_ms 30000 --setting suggest_facets off

Dockerfile

FROM datasetteproject/datasette
WORKDIR /app
RUN datasette install datasette-parquet
RUN datasette install datasette-graphql
ADD https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2009-01.parquet ./data/
ADD /run.sh ./
ADD /metadata.json ./
RUN chmod +x ./run.sh
CMD "/app/run.sh"

After running it in browser it lists the view names appropriately but errored when I navigate to any view (/trove/yellow_tripdata_2009-01) with this error Catalog Error: unrecognized configuration parameter "recursive_triggers" Did you mean: "user"

If I remove either of the graphql package it works again.. Not sure but something is clashing when both packages being used so I am not entirely sure if it's a problem in graphql package or parquet package.

cldellow commented 1 year ago

Thanks for the detailed bug report! I was able to reproduce it. I've fixed up a couple things in the DuckDB adapter to accommodate certain things that datasette-graphql does (via its sqlite-utils dependency)

I published new version 0.6 with the fix. It worked for me locally, but when I tried it on my demo site at https://dux.fly.dev/graphql/parquet?query=%7B%20%0A%20%20taxis%20%7B%0A%20%20%20%20nodes%20%7B%0A%20%20%20%20%20%20VendorID%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D, I'm getting an error.

So, YMMV. Depending on what you're doing, the new version might work. I'll try to chase down the new error, too.