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

SNOW-975719: It's not possible to create a function with external_access_integrations or secrets options #558

Closed
kokorin opened this issue Nov 21, 2023 · 2 comments

Comments

@kokorin
Copy link
Contributor

kokorin commented Nov 21, 2023

Description

Function manager supports only limited set of parameters:

def create(
    self,
    identifier: str,
    return_type: str,
    handler: str,
    artifact_file: str,
    packages: List[str],
    overwrite: bool,
) -> SnowflakeCursor:
    create_stmt = "create or replace" if overwrite else "create"
    packages_list = ",".join(f"'{p}'" for p in packages)
    return self._execute_query(
        f"""\
        {create_stmt} function {identifier}
        returns {return_type}
        language python
        runtime_version=3.8
        imports=('@{artifact_file}')
        handler='{handler}'
        packages=({packages_list})
    """
    )

Context

No response

@github-actions github-actions bot changed the title It's not possible to create a function with external_access_integrations or secrets options SNOW-975719: It's not possible to create a function with external_access_integrations or secrets options Nov 21, 2023
@sfc-gh-pjob
Copy link
Contributor

Hello @kokorin, I wrote a comment in the PR which you created (#559 (comment)) for this issue but I'll write here too that we are currently working on this feature. However we have different vision how to set external_access_integrations and secrets (more consistent with future 2.0.0 release) and we don't want to include it in 1.X releases as we don't plan to add new features there.

@sfc-gh-astus
Copy link
Contributor

Already done in #560

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

3 participants