object_reference()#

relationalai.api
#object_reference(<object_type>, <object_name>)

Creates an OBJECT REFERENCE for a specified table or view in Snowflake. This function is used to provide a reference to the source table or view when creating CDC data streams. Requires SELECT privileges to access the specified object.

Parameters#

NameTypeDescription
object_typeSTRINGThe type of the object, either 'TABLE' or 'VIEW'.
object_nameSTRINGThe fully-qualified name of the table or view in Snowflake.

Example#

Use object_reference() to create a reference to a Snowflake table or view. Replace <object_type> with 'TABLE' or 'VIEW' and <object_name> with the fully-qualified name of the table or view.

For example, to create a reference for a table my_table in the schema my_schema:

#relationalai.api.object_reference('TABLE', 'source_db.source_schema.my_table');
IMPORTANT

You may create references for up to 100 tables and 100 views in a single RAI schema, for a total of 200 source objects per schema. Each reference may have multiple streams associated with it.

See Also#