Skip to content
Lucas Lessa
Voltar para as notícias
SnowflakeGAImpacto: Médio

Remote app operations for Snowflake Native Apps now available

Providers can now run SQL commands, enable, disable, or retry upgrades on consumer apps on demand.

O que mudou

Use cases

Imagine that you develop a Snowflake Native App and need to perform maintenance or run support commands in a consumer's environment without direct account access. Providers can now execute operations directly on installed apps using a system function.

  • Run remote SQL statements on the consumer application.
  • Enable or disable the application with a reason.
  • Retry a failed upgrade.

How to use

The SYSTEM$REMOTE_APP_OPERATION function allows providers to trigger actions by passing the operation type, package name, and application hash.

SELECT SYSTEM$REMOTE_APP_OPERATION(
  'run_sql',
  'package_name',
  'application_hash',
  '{"sql": "SELECT * FROM example_schema.example_table"}'
);

What happens in this code:

  1. The function takes the operation type, which in this case is 'run_sql'.
  2. It specifies the package name and the unique application hash.
  3. It passes a JSON string containing the SQL statement to execute in the consumer's environment.
  4. It returns a request identifier for tracking purposes.

To disable an application with a reason, use:

SELECT SYSTEM$REMOTE_APP_OPERATION(
  'disable',
  'package_name',
  'application_hash',
  '{"reason": "Application needs maintenance"}'
);

What happens in this code:

  1. Sets the operation type to 'disable'.
  2. Identifies the application via package and hash.
  3. Sends the required reason inside the configuration JSON.

What it returns

FieldDescription
request_idA UUID request identifier in JSON format to track the result in the event table.

Limitations and requirements

  • This feature is Generally Available (GA).
  • Available only to providers.
  • Restricted operations like 'run_sql' require consumer consent configured via CREATE APPLICATION or ALTER APPLICATION.
  • Providers can check consent status using the APPLICATION_STATE view.
Ver nota oficial do Snowflake

Remote app operations for Snowflake Native Apps (General availability)

Resumo e explicação gerados por IA a partir da release note oficial. Em caso de dúvida, a documentação oficial da plataforma prevalece.

Relacionadas