Billing

The SnowConvert Migration Assistant uses the CORTEX.COMPLETE() function directly within your Snowflake account, and is billed at regular, per-token rates. You can view current rates in the Snowflake Service Consumption Table, and get more information on how to monitor LLM usage and costs in your account in the Snowflake documentation for using Large Language Models.

It’s not possible to precisely estimate the cost of a given interaction with the Migration Assistant because each response is custom-generated based on the code object you’re working on. A reasonable estimate for a common, one-cycle interaction to resolve an EWI is 3500 tokens. At current rates of 2.55 credits per million tokens, this results in 0.0089 credits used, at a cost of ~$0.027 for Enterprise Edition in AWS, US East (Northern Virginia). This is only an estimate, and it is possible for interactions to use significantly more tokens than this, especially if they involve multiple rounds of conversation with the LLM.

In your query history, you can view queries from the Migration Assistant, which will look similar to the example below:

SELECT SNOWFLAKE.CORTEX.COMPLETE(:1, array_construct(parse_json(:2),parse_json(:3),parse_json(:4),parse_json(:5),parse_json(:6),parse_json(:7),parse_json(:8),parse_json(:9)), parse_json(:10)) as expl ;

You can view a list of queries from the migration assistant in the QUERY_HISTORY view, which you join with the CORTEX_FUNCTIONS_QUERY_USAGE_HISTORY to see the tokens and credits consumed by each interaction. Here’s an example query that selects this data for the current user from last week’s activity:

WITH assistant_queries AS (
    SELECT
        * 
    FROM 
        SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY 
    WHERE 
        query_text ILIKE 'SELECT SNOWFLAKE.CORTEX.COMPLETE(:1%'
        AND start_time >= CURRENT_DATE()-6
        AND user_name = CURRENT_USER()
    )
SELECT 
    user_name,
    start_time, 
    usage.* 
FROM 
    SNOWFLAKE.ACCOUNT_USAGE.CORTEX_FUNCTIONS_QUERY_USAGE_HISTORY usage 
JOIN assistant_queries ON usage.query_id = assistant_queries.query_id
;

For more information on viewing query history in Snowflake, please see the Snowflake documentation:

Last updated