Provider.list_streams()#

relationalai
#Provider.list_streams(model:str) -> None

List all streams in a model. Requires the Snowflake user set in your configuration to have the cdc_admin application role.

Parameters#

NameTypeDescription
modelstrName of the model to list streams from.

Returns#

A list of dict objects representing the streams in the model.

Example#

Use .list_streams() to list all streams in a model:

#from pprint import pprint

import relationalai as rai

app = rai.Provider()
pprint(app.list_streams("MyModel"))
# [{'batches': '1',
#   'created': datetime.datetime(2024, 9, 23, 4, 56, 20, 229000),
#   'creator': 'user@company.com',
#   'errors': None,
#   'id': 'ds_00d1d5cc_71d0_44f0_9382_b2b72349cb0b',
#   'model': 'MyModel',
#   'name': 'MY_DB.MY_SCHEMA.MY_TABLE1',
#   'status': 'LOADED'},
#  {'batches': '1',
#   'created': datetime.datetime(2024, 9, 23, 4, 56, 3, 325000),
#   'creator': 'user@company.com',
#   'errors': None,
#   'id': 'ds_34ea56e7_d1d9_4cb0_beba_4a3a6ece060e',
#   'model': 'MyModel',
#   'name': 'MY_DB.MY_SCHEMA.MY_TABLE2',
#   'status': 'LOADED'}]

See Stream Management for details.

See Also#