Skip to main content
Version: 1.2.0

SQL API

Login

This function is used to generate the login url which you can use to obtain the refresh token.

SELECT Login()

StartExtractSchema

This function is to used to start the extract schema job for schema extraction.

SELECT StartExtractSchema(
"refresh token",
"snowflake url",
"snowflake account name",
"snowflake username",
"snowflake password",
"warehouse",
"database",
"schema",
"table",
"query",
"insecure",
"proxy host",
"proxy port",
"proxy username",
"proxy password"
)

Input

  • Refresh Token - (string) Token obtained by opening login url in browser
  • Snowflake Url - (string) Url of the Snowflake account
  • Snowflake Account Name - (string) Snowflake account name or identifier
  • Snowflake Username - (string) Username for the Snowflake account
  • Snowflake Password - (string) Password for the Snowflake account
  • Snowflake Warehouse - (string) Name of the Snowflake warehouse
  • Snowflake Database - (string) Name of the Snowflake database
  • Snowflake Schema - (string) Name of the Snowflake schema
  • Snowflake Table Name - (string) Name of the Snowflake table
  • Snowflake Query - (String) Select query
  • Insecure - (string) Denotes whether Snowflake environment runs on https or http
  • Proxy Host - (string) Proxy host name, if any, else ''
  • Proxy Port - (int) Proxy port, if any, else ''
  • Proxy Username - (string) Proxy username, if any, else ''
  • Proxy Password - (string) Proxy password, if any, else ''

Output

  • Job Id (string)

GetExtractSchemaResult

This function is used to obtain the result of the extract schema job which can be then used to register the feature set.

SELECT GetExtractSchemaResult(
"refresh token",
"job id"
)

Input

  • Refresh Token - (string) Token obtained by opening login url in browser
  • Job Id - (string) Job Id obtained from the StartExtractSchema function

Output

  • Schema - (string) Schema of the dataset encoded in Base64

Register

This function is used to register or create the feature set.

SELECT Register(
"refresh token",
"project name",
"feature set name",
"schema"
)

Input

  • Refresh Token - (string) Token obtained by opening login url in browser
  • Project Name - (string) Name of the project in Feature Store
  • Name- (string) Name of the feature set
  • Schema - (string) Base64 encoded schema obtained from GetExtractSchemaResult

Output

  • Message (string)

StartIngest

This function is used to trigger the ingest job for the feature set.

SELECT StartIngest(
"refresh token",
"project name",
"feature set name",
"snowflake url",
"snowflake account name",
"snowflake username",
"snowflake password",
"warehouse",
"database",
"schema",
"table",
"query",
"insecure",
"proxy host",
"proxy port",
"proxy username",
"proxy password"
)

Input

  • Refresh Token - (string) Token obtained by opening login url in browser
  • Project Name - (string) Name of the project in feature store
  • Name - (string) Name of the feature set
  • Snowflake Url - (string) Url of the snowflake account
  • Snowflake Account Name - (string) Snowflake account name or identifier
  • Snowflake Username - (string) Username for the Snowflake account
  • Snowflake Password - (string) Password for the Snowflake account
  • Snowflake Warehouse - (string) Name of the Snowflake warehouse
  • Snowflake Database - (string) Name of the Snowflake database
  • Snowflake Schema - (string) Name of the Snowflake schema
  • Snowflake Table Name - (string) Name of the Snowflake table
  • Snowflake Query - (String) Select query
  • Insecure - (string) Denotes whether Snowflake environment runs on https or http
  • Proxy Host - (string) Proxy host name, if any, else ''
  • Proxy Port - (int) Proxy port, if any, else ''
  • Proxy Username - (string) Proxy username, if any, else ''
  • Proxy Password - (string) Proxy password, if any, else ''

Output

  • Job Id (string)

GetIngestResult

This function is used to obtain the result of the data ingest job.

SELECT GetIngestResult(
"refresh token",
"job id"
)

Input

  • Refresh Token - (string) Token obtained by opening login url in browser
  • Job Id - (string) Job Id obtained from the StartIngest function

Output

  • Cache Location - (string) Location of the ingested data set in Azure
  • Ingestion Timestamp - (timestamp) Timestamp of ingest
  • Ingest Scope - (object) Start & End Date Time of the ingested data

StartRetreive

This function is used to start the retrieve job for the feature set.

SELECT StartRetrieve(
"refresh token",
"project name",
"feature set name"
)

Input

  • Refresh Token - (string) Token obtained by opening login url in browser
  • Project Name - (string) Name of the project in feature store
  • Name - (string) Name of the feature set

Output

  • Job Id (string)

GetRetrieveResult

This function is used to obtain the query to create an external table pointing to the feature set data.

SELECT GetRetrieveResult(
"refresh token",
"project name",
"feature set name",
"snowflake stage name",
"external table name",
"job id"
)

Input

  • Refresh Token - (string) Token obtained by opening login url in browser
  • Project Name - (string) Name of the project in Feature Store
  • Name - (string) Name of the feature set
  • Snowflake Stage Name - (string) Name of the Snowflake Azure stage that is integrated with the Feature Store Retrieve Cache
  • External Table Name - (string) Name of the external table that needs to be created
  • Job Id - (string) Job Id obtained from the StartRetrieve function

Output

  • Create External Table Query (string)

SearchByFeatureSet

This function is used to search and obtain the feature set names by using properties of the feature set.

Searchable fields

Field nameOperators
nameeq, ne in, like
descriptioneq, ne in, like
deprecatedeq, ne
application_nameeq, ne in, like
application_ideq, ne in, like
tagseq, ne in, like
data_source_domainseq, ne in, like
ownereq, ne in, like
authoreq, ne in, like
SELECT SearchByFeatureSet(
"refresh token",
"project name",
array_construct(
array_construct("field name", "operator", "value"), // Filter 1
array_construct("field name", "operator", "value"), // Filter 2
)
)

Input

  • Refresh Token - (string) Token obtained by opening login url in browser
  • Project Name (string) - Name of the project in Feature Store
  • Params(array(array)) - Array of the array of parameters

Output

  • List of matching feature set names that are obtained by applying all the provided filter conditions

Feedback