Hi all,
I have created a connection to a sqlite file, that has inside the table test.

But if I run the query redash gives me “no such table”.

select * from test

What’s wrong?

Thank you

Probably my question has a really simple answer, but I do not find a solution and I’m blocked :frowning2:

Thank you

Hi, I’m doing some simple tests and I had the same problem.

1 Like

Did you create the database file inside your Docker container or on a volume?

Hi @arikfr I have created the db in my PC desktop and than I have moved it a folder shared with my docker container, and I have no problem with connection test, redash connects to my sqlite db, but it gives me “no such table”.

Please look a this short video:

Give it a full path. When you specify just dummy.db it’s probably opened in a path relative to the code and probably not where you set the volume to mount. In such case sqlite just creates a new database file, which obviously doesn’t have your table/data.

1 Like

Hi @arikfr now I see it, but I have the same error, “no such table”

Thank you

I my docker installation I have 3 container:

  • redash_nginx_1
  • redash_worker_1
  • redash_server_1
  • redash_postgres_1
  • redash_redis_1

The web interface that I use to set new datasource is redash_worker?

Share it with the worker and server.

Hi @arikfr please be still patient with me :slight_smile:

Below you have my configuration, but I’m not a docker user.
I have only restarted docker. Do I must give some “build” parameters to pass the new volumes parameters?

I have moved my sqlite in /var/redash/shared/ondata, but once again I have “no such table: test”

version: '2'
services:
  server:
    image: redash/redash:latest
    volumes:
      - /var/redash/shared/ondata
    command: server
    depends_on:
      - postgres
      - redis
    ports:
      - "5000:5000"
    environment:
      PYTHONUNBUFFERED: 0
      REDASH_LOG_LEVEL: "INFO"
      REDASH_REDIS_URL: "redis://redis:6379/0"
      REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
      REDASH_COOKIE_SECRET: ******
      REDASH_WEB_WORKERS: 4
  worker:
    image: redash/redash:latest
    volumes:
      - /var/redash/shared/ondata
    command: scheduler
    environment:
      PYTHONUNBUFFERED: 0
      REDASH_LOG_LEVEL: "INFO"
      REDASH_REDIS_URL: "redis://redis:6379/0"
      REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
      QUEUES: "queries,scheduled_queries,celery"
      WORKERS_COUNT: 2
  redis:
    image: redis:3.0-alpine
  postgres:
    image: postgres:9.5.6-alpine
    volumes:
      - /var/redash/shared/ondata
  nginx:
    image: redash/nginx:latest
    ports:
      - "8188:80"
    depends_on:
      - server
    links:
      - server:redash

Hi @arikfr I’m blocked :frowning:

What’s wrong in your opinion?

Thank you

Usually when doing changes to the definitions, you need to rebuild the image(s).

@aborruso - if you or anyone is still stuck on this one…

The sqlite db needs to be copied over manually :frowning_face: to each and every running worker container and to the same path

So if you had set the datasource to /home/redash/mysqlite.db then you have to

docker cp mysqlite.db :/home/redash

I ran

docker ps |grep worker

to get all my redis worker ids.

Why not mount it as a Docker VOLUME?