Skip to main content
Version: v3.x (DDN)

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

All connectors use the same command to introspect a data source:
ddn connector introspect <name_of_connector>
Is your Docker daemon running?

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:

FileDescription
configuration.jsonAn 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>.hmlContains the DataConnectorLink for your connector.
When to use this command

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.