Skip to content

TimeScaleDb container #126

Closed
Closed

Description

@vikrambosevibrent

TimeScaleDb Container not available. is that any plan to add that? Thanks

Activity

  1. tillahoffmann commented on Dec 22, 2020

    @tillahoffmann
    Contributor

    Not planned at the moment, but PRs are welcome.

  2. vikrambosevibrent commented on Dec 22, 2020

    @vikrambosevibrent
    Author

    sure.. Will do that..

  3. pffijt commented on Nov 21, 2022

    @pffijt
    Contributor

    It wouldn't be necessary to create a separate module/client for a TimescaleDB container since TimescaleDB is just an extension on top of PostgreSQL (see here). Users of the TimescaleDB container can make use of PostgresDB container client.

    Example:

    timescaled_container = PostgresContainer('timescale/timescaledb:latest-pg12')
    
    with timescaled_container as timescaled:
        e = sqlalchemy.create_engine(timescaled.get_connection_url())
        e.execute('''
            CREATE TABLE stocks_real_time (
              time TIMESTAMPTZ NOT NULL,
              symbol TEXT NOT NULL,
              price DOUBLE PRECISION NULL,
              day_volume INT NULL
            ); 
        ''')
    
        e.execute('''
            SELECT create_hypertable('stocks_real_time','time');
        ''')
  4. pffijt commented on Nov 22, 2022

    @pffijt
    Contributor

    I think we can close this issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions