atoti_directquery_synapse.vectorized_table_options module#

class atoti_directquery_synapse.SynapseVectorizedTableOptions#

Options to create a vectorized table from a Synapse database.

Parameters
  • 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

Example

>>> from atoti_directquery_synapse import SynapseVectorizedTableOptions
>>> external_table = external_database.tables["TESTS", "VECT_PRODUCTS"]
>>> table = session.add_external_table(
...     external_table,
...     options=SynapseVectorizedTableOptions(
...         index_column="IDX",
...         vector_columns=["VECT_PRICE", "VECT_QUANTITY"],
...     ),
... )
>>> table.head()
                                         VECT_PRICE            VECT_QUANTITY
PRODUCT DATE
p1      2021-07-19     [10.0, 11.0, 12.0, 9.0, 9.0]  [100, 89, 86, 120, 120]
p2      2021-07-19   [21.0, 20.0, 22.0, 20.3, 15.0]     [73, 78, 68, 79, 98]
p3      2021-07-19   [45.0, 45.0, 41.0, 40.0, 40.0]     [32, 33, 45, 45, 52]
p1      2021-07-20     [10.0, 12.0, 14.0, 8.0, 9.0]  [101, 80, 71, 115, 109]
p2      2021-07-20  [27.0, 20.0, 21.0, 20.87, 17.0]     [56, 69, 72, 68, 97]
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.