Introspect a source
Introduction
This guide explains how to use a connector to introspect a data source. After introspection, you'll be ready to begin generating Hasura metadata that represents resources (such as tables or collections) in your data source.
You'll need an initialized data connector before attempting to introspect a source.
Step 1. Run the introspect command
ddn connector introspect <name_of_connector>
When you run the introspection command, the connector will start. As it runs as a Docker service, the Docker daemon must be running.
The connector will reach out to your data source and update the configuration files with information about your source schema. This will vary depending on the connector but, at a minimum, you'll see source-specific information updated in two files, both located in your connector's directory:
File | Description |
---|---|
configuration.json | An Open Data Domain Specification description of your data source. The CLI uses this file to update the DataConnectorLink object with information about your data source. |
<name_of_connector>.hml | Contains the DataConnectorLink for your connector. |
This command will be used at least once with every connector; Hasura must introspect your data source in order to understand the resources that are present.
Additionally, any time you modify your source schema, you should re-run this command to ensure your Hasura metadata is up-to-date with your source schema.
Next steps
With your source introspected and the configuration files populated, you can now start creating Hasura metadata that will represent your source's schema in your API. Check out the Data Modeling section to begin creating models, commands, and relationships for your data.