Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade py38 objects in Snowflake #1203

Open
colin-rogers-dbt opened this issue Oct 9, 2024 · 0 comments
Open

Upgrade py38 objects in Snowflake #1203

colin-rogers-dbt opened this issue Oct 9, 2024 · 0 comments
Assignees

Comments

@colin-rogers-dbt
Copy link
Contributor

We are reaching out because we have identified that your Snowflake account currently contains one or more objects using the Python 3.8 runtime. As Python 3.8 will reach its End-Of-Life (EOL) on October 14, 2024 [1], there will be no further bug fixes or security updates for this runtime.

As described in the Python runtime support policy [2], the end of support for language runtimes happens in two stages.

  1. Stage One: Starting October 14, 2024, Snowflake will no longer apply security patches or other updates to the Python 3.8 runtime, and objects using the Python 3.8 runtime will no longer be eligible for technical support.
  2. Stage Two: Starting March 31, 2025, you will no longer be able to create new objects using Python 3.8.

We recommend that you upgrade your existing Python 3.8 objects to Python 3.9 or greater before March 31, 2025. Please note that end of support does not impact execution, and you will still be able to update and invoke existing objects. However, they will be running on an unsupported runtime which will no longer be maintained or patched by the Snowflake team. For Streamlit in Snowflake (SiS), support for higher Python versions will be made available as part of BCR 2024_08.

The following command lists all objects using Python 3.8. To find all such objects in your account, repeat this command for each database:

-- To get a list of databases
SELECT * FROM information_schema.databases;

-- To get all Python 3.8 UDx of a database
SELECT
    function_catalog,
    function_schema,
    function_name,
    function_owner,
    argument_signature,
    function_definition
FROM <database_name>.information_schema.functions
WHERE runtime_version = '3.8';

-- To get all Python 3.8 Procedures
SET db=<database_name>;

WITH ddl_data AS (
    SELECT
        SPLIT(UPPER(ddl_string),
        'CREATE OR REPLACE') AS ddl_parts
    FROM (
        SELECT
            GET_DDL('DATABASE', $db, true) AS ddl_string
    ) gd
),
sp_ddl AS (
    SELECT
        'CREATE OR REPLACE ' \|\| TRIM(value) AS sp
    FROM ddl_data,
    LATERAL FLATTEN(input => ddl_parts)
    WHERE TRIM(value) != ''
      AND STARTSWITH (sp, 'CREATE OR REPLACE PROCEDURE')
)

SELECT
    REGEXP_SUBSTR(sp, 'PROCEDURE\\s+([A-Z0-9_.]+)', 1, 1, 'i', 1) AS name,
    REGEXP_SUBSTR(sp, 'RUNTIME_VERSION\\s*=\\s*\'([0-9.]+)\'', 1, 1, 'e', 1) AS runtime_version,
    REGEXP_SUBSTR(sp, 'LANGUAGE\\s+([A-Z]+)', 1, 1, 'e', 1) AS language, sp FROM sp_ddl
WHERE REGEXP_SUBSTR(sp, 'LANGUAGE\\s+([A-Z]+)', 1, 1, 'e', 1) = 'PYTHON';

If you have any concerns or require further assistance, please contact Snowflake Support [3].

[1] Status of Python versions

[2] Snowflake Python Runtime Support

[3] Snowflake Support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants