--- title: "How To Run A Connector Function in Multiple Environments" slug: "how-to-run-a-connector-function-in-multiple-environments" updated: 2025-01-08T12:03:20Z published: 2025-01-08T12:03:20Z canonical: "support.tulip.co/how-to-run-a-connector-function-in-multiple-environments" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.tulip.co/llms.txt > Use this file to discover all available pages before exploring further. # 如何在多个环境中运行连接器功能 MQTT Connectors MQTT connectors do not support multiple environments. ## 什么是环境? 连接器环境允许您根据应用程序的生命周期阶段,为连接器定义与之交互的独立目标外部系统。 环境允许您在不影响生产数据库的情况下安全地开发应用程序,并在发布应用程序时自动迁移到生产数据库。 ![image.png](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/image%28742%29.png) ## 设置多个环境 ::: (警告)(编辑已发布应用程序/自动化中使用的环境)编辑已发布应用程序/自动化使用的环境可能会影响生产。并非所有用户都有权限进行这些更改。 [自定义用户角色](/r230/docs/customize-user-roles)赋予账户所有者对正在使用的环境进行编辑的权限。没有足够权限的用户将看到一个警告![image.png](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/image%28727%29.png){height="" width=""} ::: 创建新的 SQL 或 HTTP 连接器后,会看到如下界面。 ![image.png](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/image%28628%29.png){height="" width="""} 默认情况下,将只配置 "生产 "环境,而 "开发 "和 "预生产 "环境的配置将与生产环境一致。 ![image.png](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/image%28629%29.png) ## 如何使用环境 根据应用程序的运行位置和状态,将使用不同的环境。 在开发者模式下,环境可以被覆盖,但在郁金香播放器中,所使用的环境将完全由应用程序生命周期中的阶段决定。 **开发**- 当使用应用程序的开发版本时(在播放器或开发模式下),将使用开发环境的配置。 **预生产**- 当应用程序已提交审批但尚未通过审批时,将使用 "预生产 "环境配置。 **生产**- 当应用程序已发布时,将使用生产环境。 ![image.png](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/image%28743%29.png) ## 进一步阅读 - [如何编写连接器函数](/r230/docs/how-to-write-a-sql-connector-function) - [如何使用触发器调用连接器函数](/r230/docs/how-to-call-a-connector-function-using-triggers)