atoti_directquery_snowflake.vectorized_table_options module#

class atoti_directquery_snowflake.SnowflakeVectorizedTableOptions#

Options to create a vectorized table from a Snowflake database.

Example

>>> from atoti_directquery_snowflake import SnowflakeVectorizedTableOptions
>>> external_table = external_database.tables[
...     "TEST_RESOURCES", "TESTS", "VECT_PRODUCTS"
... ]
>>> table = session.add_external_table(
...     external_table,
...     options=SnowflakeVectorizedTableOptions(
...         index_column="IDX",
...         vector_columns=["VECT_PRICE", "VECT_QUANTITY"],
...     ),
... )
>>> table.head()
                                         VECT_PRICE              VECT_QUANTITY
PRODUCT DATE
p2      2021-07-20  [27.0, 20.0, 21.0, 20.87, 17.0]       [56, 69, 72, 68, 97]
p3      2021-07-21  [42.0, 40.0, 38.0, 39.0, 37.44]  [-44, -52, -65, -64, -70]
p1      2021-07-20     [10.0, 12.0, 14.0, 8.0, 9.0]    [101, 80, 71, 115, 109]
p2      2021-07-19   [21.0, 20.0, 22.0, 20.3, 15.0]       [73, 78, 68, 79, 98]
p1      2021-07-19     [10.0, 11.0, 12.0, 9.0, 9.0]    [100, 89, 86, 120, 120]
index_column: str#

Name of the column used as an index for the vectors.

vector_columns: Sequence[str]#

Names of the columns that contain the vectors values.