2

I am trying to create a timeseries in Redis using python like so:

    import redis
    connection_redis = redis.Redis(host='127.0.0.1', port=6379)
    connection_redis.ts().create('ts', retention_msecs=0)

but I get the following error: ResponseError: unknown command 'TS.CREATE'.

I have been searching for a way to solve this problem but I haven't found anything. I am running redis in a docker.

Thank you :)!

The Governor
  • 302
  • 1
  • 9

1 Answers1

5

The Redis docker image does not contain any Redis module.

You can use the Redis Stack docker image.

redis/redis-stack-server contains the RediSearch, RedisJSON, RedisGraph, RedisTimeSeries, and RedisBloom modules. redis/redis-stack also contains RedisInsight.

Lior Kogan
  • 19,919
  • 6
  • 53
  • 85