
Data Connectors - Launch Week #3

Architecture of Data Connectors
With the Morph framework, you can establish authenticated connections to external APIs or databases with an incredibly simple setup.
Setting Up Connections from the Dashboard
Log in to the Morph dashboard and register a new connector under the Connectors tab. Then enable the connector from your project page. That’s it!
Any connectors registered via the dashboard can be used as-is in your deployment environment.
Registering Connection Information Locally
You can also save your connection information directly in a local file. Store the authentication details in the .morph/connections.yml
file within your project directory.
Since the required settings may vary depending on the service or database type, please refer to the documentation:
https://docs.morph-data.io/docs/ja/advanced/connectors/mysql
Using Connections in Code
The Morph framework makes it easy to utilize your registered connection information within the code of your project, if you are comfortable using it. Have a look at our documentation for code examples in both Python and SQL.
import morph
from morph import MorphGlobalContext
from morph_lib.database import execute_sql
@morph.func
def main(context: MorphGlobalContext):
df = execute_sql(
sql="SELECT * from table_name"
connection="connection_name"
)
# for SaaS connecotr
access_token = get_auth_token("stripe_connector")
{{
config(
connection="connection_name"
)
}}
select * from table_name
Supported Connectors
You can explore the connectors supported by our dashboard management on the following page:
https://www.morph-data.io/tools
Even if a connector is not listed there, if the service provides an API, you can manage authentication details using environment variables and access it from Python. There are no restrictions!
Related Articles


