[Python] Getting "Container not found" error when trying to modify GridDB container column...

Discussão em 'Python' iniciado por Stack, Setembro 1, 2025.

  1. Stack

    Stack Membro Participativo

    I need to add columns to an existing GridDB container in my Python application, but getting a "Container not found" error when trying to modify the ColumnInfo after container creation.

    `import griddb_python as griddb

    Original container creation works fine


    container_info = griddb.ContainerInfo("sensor_data",

    [ ["timestamp", griddb.Type.TIMESTAMP],

    ["sensor_id", griddb.Type.STRING],

    ["temperature", griddb.Type.DOUBLE]

    ],

    griddb.ContainerType.TIME_SERIES, True)

    container = store.put_container(container_info)

    This fails with "Container not found" error


    try:

    new_column_info = griddb.ContainerInfo("sensor_data",

    [

    ["timestamp", griddb.Type.TIMESTAMP],

    ["sensor_id", griddb.Type.STRING],

    ["temperature", griddb.Type.DOUBLE],

    ["humidity", griddb.Type.DOUBLE]

    ],

    griddb.ContainerType.TIME_SERIES, True)

    modified_container = store.put_container(new_column_info) # FAILS HERE

    except Exception as e: print(f"Error: {e}")`

    I need to asked three specific questions

    Why does put_container() with modified ColumnInfo throw "Container not found"?

    Is there a different API method for adding columns to existing containers?

    Do I need to drop and recreate the container, or can I modify schema in-place?

    Continue reading...

Compartilhe esta Página