Publish from within Snowflake
These instructions help you publish from Posit Workbench to Posit Connect when both installations are managed by the Posit Team Native App hosted in Snowflake Snowpark Container Services (SPCS).
Follow the instructions in Publish from outside Snowflake when your development environment is outside Snowflake and you want to publish into a Snowflake-managed Connect installation.
When accessing a Connect installation within Snowflake, you need to configure Snowflake authentication as well as a Connect API key.
These instructions assume that your Workbench session is configured to use Snowflake managed credentials.
Before getting started, visit your Connect installation and provision an API key. Use that API key to configure your Connect account in Workbench.
The Connect documentation contains instructions about other ways to publish.
rsconnect-python
rsconnect-python is a Python package used to deploy content to Posit Connect. It uses your configured Snowflake connections when interacting with a Connect instance hosted in Snowflake.
First, install the rsconnect-python package.
Terminal
# Note: The rsconnect-python PyPI release does fully support
# SPCS authentication.
python -m pip install "rsconnect-python[snowflake] @git+https://github.com/posit-dev/rsconnect-python"Next, configure your Connect account. These commands assume that you are using the Workbench managed credentials, which configure a Snowflake connection named “workbench”.
Terminal
rsconnect add \
          --server "https://<instance-id>-<account-id>.snowflakecomputing.app" \
          --name "spcs" \
          --api-key "your-connect-api-key" \
          --snowflake-connection-name "workbench"Last, deploy your content. This command deploys a Shiny for Python application.
Terminal
rsconnect deploy shiny -n spcs "/path/to/app"rsconnect
rsconnect is an R package used to deploy content to Posit Connect. It uses your configured Snowflake connections when interacting with a Connect instance hosted in Snowflake.
First, install the rsconnect package.
R console
# Note: The rsconnect CRAN release does fully support
# SPCS authentication.
remotes::install_github("rstudio/rsconnect")Next, configure your Connect account. These commands assume that you are using the Workbench managed credentials, which configure a Snowflake connection named “workbench”.
R console
rsconnect::addServer(
  "https://<instance-id>-<account-id>.snowflakecomputing.app",
  name = "spcs",
  snowflakeConnectionName = "workbench"
)
rsconnect::connectSPCSUser(
  server = "spcs",
  apiKey = "my-api-key",
  snowflakeConnectionName = "workbench"
)Last, deploy your content. This command assumes that the target content is in the current working directory.
R console
rsconnect::deployApp(server = "spcs")Publisher (Positron, VS Code)
Posit Publisher is a VS Code extension that can be used with Positron or VS Code to deploy to Posit Connect. It is available for download and installation from the extensions marketplace.
- Install the Publisher extension (version > 1.16.0).
- When deploying your project, use the https://connect/URL and your Connect API key.