From 0834444ffd73c179d759111057c32f968bee7d1f Mon Sep 17 00:00:00 2001 From: Brandon Martin Date: Wed, 10 Jul 2024 07:07:45 -0600 Subject: [PATCH 1/4] MongoDB v1.0.0 (#196) https://github.com/hasura/ndc-mongodb/releases/tag/v1.0.0 --- registry/mongodb/metadata.json | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/registry/mongodb/metadata.json b/registry/mongodb/metadata.json index 334b069e..53e9e124 100644 --- a/registry/mongodb/metadata.json +++ b/registry/mongodb/metadata.json @@ -7,7 +7,7 @@ "tags": [ "database" ], - "latest_version": "v0.1.0" + "latest_version": "v1.0.0" }, "author": { "support_email": "support@hasura.io", @@ -17,6 +17,17 @@ "is_verified": true, "is_hosted_by_hasura": false, "packages": [ + { + "version": "1.0.0", + "uri": "https://github.com/hasura/ndc-mongodb/releases/download/v1.0.0/connector-definition.tgz", + "checksum": { + "type": "sha256", + "value": "0dc038620f40911a2c5662b61d8e2ac9605876c80b3eb3cbae5cc1ebcd5b611f" + }, + "source": { + "hash": "4beb7ddabddc3035ca5cc7bd85493a71a2e34147" + } + }, { "version": "0.1.0", "uri": "https://github.com/hasura/ndc-mongodb/releases/download/v0.1.0/connector-definition.tgz", @@ -99,6 +110,11 @@ "is_open_source": true, "repository": "https://github.com/hasura/ndc-mongodb/", "version": [ + { + "tag": "v1.0.0", + "hash": "4beb7ddabddc3035ca5cc7bd85493a71a2e34147", + "is_verified": true + }, { "tag": "v0.1.0", "hash": "175272912b86a11359a9b6b7fd72c7a6e2326bf1", From cdca87df24e624d98a9d2616d3e78f6618ed1008 Mon Sep 17 00:00:00 2001 From: Gavin Ray Date: Wed, 10 Jul 2024 09:37:12 -0700 Subject: [PATCH 2/4] Initial commit for JVM connectors (#192) Co-authored-by: gneeri --- registry/mysql/README.md | 169 ++++++++++++++++++++++++++++++ registry/mysql/metadata.json | 43 ++++++++ registry/oracle/README.md | 169 ++++++++++++++++++++++++++++++ registry/oracle/metadata.json | 43 ++++++++ registry/snowflake/README.md | 170 +++++++++++++++++++++++++++++++ registry/snowflake/metadata.json | 43 ++++++++ 6 files changed, 637 insertions(+) create mode 100644 registry/mysql/README.md create mode 100644 registry/mysql/metadata.json create mode 100644 registry/oracle/README.md create mode 100644 registry/oracle/metadata.json create mode 100644 registry/snowflake/README.md create mode 100644 registry/snowflake/metadata.json diff --git a/registry/mysql/README.md b/registry/mysql/README.md new file mode 100644 index 00000000..e5617968 --- /dev/null +++ b/registry/mysql/README.md @@ -0,0 +1,169 @@ +# MySQL Connector + +[![Docs](https://img.shields.io/badge/docs-v3.x-brightgreen.svg?style=flat)](https://hasura.io/docs/3.0/getting-started/overview/) +[![ndc-hub](https://img.shields.io/badge/ndc--hub-sqlserver-blue.svg?style=flat)](https://hasura.io/connectors/sqlserver) +[![License](https://img.shields.io/badge/license-Apache--2.0-purple.svg?style=flat)](LICENSE.txt) +[![Status](https://img.shields.io/badge/status-alpha-yellow.svg?style=flat)](./readme.md) + +With this connector, Hasura allows you to instantly create a real-time GraphQL API on top of your data models in +MySQL. This connector supports MySQL's functionalities listed in the table below, allowing for +efficient and scalable data operations. Additionally, users benefit from all the powerful features of Hasura’s Data +Delivery Network (DDN) platform, including query pushdown capabilities that delegate query operations to the database, +thereby enhancing query optimization and performance. + +This connector implements the [Data Connector Spec](https://github.com/hasura/ndc-spec). + +- [Connector information in the Hasura Hub](https://hasura.io/connectors/mysql) +- [Hasura V3 Documentation](https://hasura.io/docs/3.0) + +## Features + +Below, you'll find a matrix of all supported features for the MySQL connector: + +| Feature | Supported | Notes | +| ------------------------------- | --------- | ----- | +| Native Queries + Logical Models | ✅ | | +| Native Mutations | ❌ | | +| Simple Object Query | ✅ | | +| Filter / Search | ✅ | | +| Simple Aggregation | ✅ | | +| Sort | ✅ | | +| Paginate | ✅ | | +| Table Relationships | ✅ | | +| Views | ✅ | | +| Remote Relationships | ✅ | | +| Custom Fields | ❌ | | +| Mutations | ❌ | | +| Distinct | ❌ | | +| Enums | ❌ | | +| Naming Conventions | ❌ | | +| Default Values | ❌ | | +| User-defined Functions | ❌ | | + +## Before you get Started + +1. Create a [Hasura Cloud account](https://console.hasura.io) +2. Install the [CLI](https://hasura.io/docs/3.0/cli/installation/) +3. Install the [Hasura VS Code extension](https://marketplace.visualstudio.com/items?itemName=HasuraHQ.hasura) +4. [Create a supergraph](https://hasura.io/docs/3.0/getting-started/init-supergraph) +5. [Create a subgraph](https://hasura.io/docs/3.0/getting-started/init-subgraph) + +## Using the connector + +To use the MySQL connector, follow these steps in a Hasura project: +(Note: for more information on the following steps, please refer to the Postgres connector +documentation [here](https://hasura.io/docs/3.0/getting-started/connect-to-data/connect-a-source)) + +### 1. Init the connector + +(Note: here and following we are naming the subgraph "my_subgraph" and the connector "my_mysql") + + ```bash + ddn connector init my_mysql --subgraph my_subgraph --hub-connector hasura/MySQL + ``` + +### 2. Add your MySQL credentials: + +Add your credentials to `my_subgraph/connector/my_sql/.env.local` + +```env title="my_subgraph/connector/my_mysql/.env.local" +JDBC_URL="jdbc:MySQL:thin:@//host.docker.internal:1521/XE?user=&password=" +``` + +### 3. Introspect your indices + +```bash title="From the root of your project run:" +ddn connector introspect --connector my_subgraph/connector/my_mysql/connector.yaml +``` + +If you look at the `configuration.json` for your connector, you'll see metadata describing your MySQL mappings. + +### 4. Create the Hasura metadata + +```bash title="Run the following from the root of your project:" +ddn connector-link add my_mysql --subgraph my_subgraph +``` + +The generated file has two environment variables — one for reads and one for writes — that you'll need to add to your +subgraph's `.env.my_subgraph` file. Each key is prefixed by the subgraph name, an underscore, and the name of the +connector. Ensure the port value matches what is published in your connector's docker compose file. + +```env title="my_subgraph/.env.my_subgraph" +MY_SUBGRAPH_my_mysql_READ_URL=http://local.hasura.dev:8081 +MY_SUBGRAPH_my_mysql_WRITE_URL=http://local.hasura.dev:8081 +``` + +### 5. Start the connector's docker compose + +Let's start our connector's docker compose file. + +```bash title="Run the following from the connector's subdirectory inside a subgraph:" +docker compose -f docker-compose.my_mysql.yaml up +``` + +This starts our MySQL connector on the specified port. We can navigate to the following address, with the port +modified, to see the schema of our MySQL data source: + +```bash +http://localhost:8081/schema +``` + +### 6. Include the connector in your docker compose + +Kill the connector by pressing `CTRL+C` in the terminal tab in which the connector is running. + +Then, add the following inclusion to the docker compose `docker-compose.hasura.yaml` in your project's root directory, +taking care to modify the +subgraph's name. + +```yaml title="docker-compose.hasura.yaml" +include: + - path: my_subgraph/connector/my_mysql/docker-compose.my_mysql.yaml +``` + +Now, whenever running the following, you'll bring up the GraphQL engine, observability tools, and any connectors you've +included: + +```bash title="From the root of your project, run:" +HASURA_DDN_PAT=$(ddn auth print-pat) docker compose -f docker-compose.hasura.yaml watch +``` + +### 7. Update the new DataConnectorLink object + +Finally, now that our `DataConnectorLink` has the correct environment variables configured for the MySQL connector, +we can run the update command to have the CLI look at the configuration JSON and transform it to reflect our database's +schema in `hml` format. In a new terminal tab, run: + +```bash title="From the root of your project, run:" +ddn connector-link update my_mysql --subgraph my_subgraph +``` + +After this command runs, you can open your `my_subgraph/metadata/my_mysql.hml` file and see your metadata completely +scaffolded out for you 🎉 + +### 8. Import _all_ your indices + +You can do this in one convenience command. + +```bash title="From the root of your project, run:" +ddn connector-link update my_mysql --subgraph my_subgraph --add-all-resources +``` + +### 9. Create a supergraph build + +Pass the `local` subcommand along with specifying the output directory as `./engine` in the root of the project. This +directory is used by the docker-compose file to serve the engine locally: + +```bash title="From the root of your project, run:" +ddn supergraph build local --output-dir ./engine +``` + +You can now navigate to +[`https://console.hasura.io/local/graphql?url=http://localhost:3000`](https://console.hasura.io/local/graphql?url=http://localhost:3000) +and interact with your API using the Hasura Console. + + +## License + +The Hasura MySQL connector is available under the [Apache License +2.0](https://www.apache.org/licenses/LICENSE-2.0). \ No newline at end of file diff --git a/registry/mysql/metadata.json b/registry/mysql/metadata.json new file mode 100644 index 00000000..4d991b39 --- /dev/null +++ b/registry/mysql/metadata.json @@ -0,0 +1,43 @@ +{ + "overview": { + "namespace": "hasura", + "description": "Connect to a MySQL database and expose it to Hasura v3 Project", + "title": "MySQL Connector", + "logo": "logo.png", + "tags": [ + "database" + ], + "latest_version": "v0.1.0" + }, + "author": { + "support_email": "support@hasura.io", + "homepage": "https://hasura.io", + "name": "Hasura" + }, + "is_verified": true, + "is_hosted_by_hasura": true, + "packages": [ + { + "version": "0.1.0", + "uri": "https://github.com/hasura/ndc-jvm-mono/releases/download/mysql%2Fv0.1.0/package.tar.gz", + "checksum": { + "type": "sha256", + "value": "09b51f9be725099345159880d21efb712776bfd09291a0daa81d7e7b1418ca2c" + }, + "source": { + "hash": "145792746281b606bcef2dfe20d1f0ad69efe01e" + } + } + ], + "source_code": { + "is_open_source": true, + "repository": "https://github.com/hasura/ndc-jvm-mono", + "version": [ + { + "tag": "mysql/v0.1.0", + "hash": "145792746281b606bcef2dfe20d1f0ad69efe01e", + "is_verified": true + } + ] + } +} \ No newline at end of file diff --git a/registry/oracle/README.md b/registry/oracle/README.md new file mode 100644 index 00000000..604f318c --- /dev/null +++ b/registry/oracle/README.md @@ -0,0 +1,169 @@ +# Oracle Connector + +[![Docs](https://img.shields.io/badge/docs-v3.x-brightgreen.svg?style=flat)](https://hasura.io/docs/3.0/getting-started/overview/) +[![ndc-hub](https://img.shields.io/badge/ndc--hub-sqlserver-blue.svg?style=flat)](https://hasura.io/connectors/sqlserver) +[![License](https://img.shields.io/badge/license-Apache--2.0-purple.svg?style=flat)](LICENSE.txt) +[![Status](https://img.shields.io/badge/status-alpha-yellow.svg?style=flat)](./readme.md) + +With this connector, Hasura allows you to instantly create a real-time GraphQL API on top of your data models in +Oracle. This connector supports Oracle's functionalities listed in the table below, allowing for +efficient and scalable data operations. Additionally, users benefit from all the powerful features of Hasura’s Data +Delivery Network (DDN) platform, including query pushdown capabilities that delegate query operations to the database, +thereby enhancing query optimization and performance. + +This connector implements the [Data Connector Spec](https://github.com/hasura/ndc-spec). + +- [Connector information in the Hasura Hub](https://hasura.io/connectors/oracle) +- [Hasura V3 Documentation](https://hasura.io/docs/3.0) + +## Features + +Below, you'll find a matrix of all supported features for the Oracle connector: + +| Feature | Supported | Notes | +|---------------------------------|-----------|-------| +| Native Queries + Logical Models | ✅ | | +| Native Mutations | ❌ | | +| Simple Object Query | ✅ | | +| Filter / Search | ✅ | | +| Simple Aggregation | ✅ | | +| Sort | ✅ | | +| Paginate | ✅ | | +| Table Relationships | ✅ | | +| Views | ✅ | | +| Remote Relationships | ✅ | | +| Custom Fields | ❌ | | +| Mutations | ❌ | | +| Distinct | ❌ | | +| Enums | ❌ | | +| Naming Conventions | ❌ | | +| Default Values | ❌ | | +| User-defined Functions | ❌ | | + +## Before you get Started + +1. Create a [Hasura Cloud account](https://console.hasura.io) +2. Install the [CLI](https://hasura.io/docs/3.0/cli/installation/) +3. Install the [Hasura VS Code extension](https://marketplace.visualstudio.com/items?itemName=HasuraHQ.hasura) +4. [Create a supergraph](https://hasura.io/docs/3.0/getting-started/init-supergraph) +5. [Create a subgraph](https://hasura.io/docs/3.0/getting-started/init-subgraph) + +## Using the connector + +To use the Oracle connector, follow these steps in a Hasura project: +(Note: for more information on the following steps, please refer to the Postgres connector +documentation [here](https://hasura.io/docs/3.0/getting-started/connect-to-data/connect-a-source)) + +### 1. Init the connector + +(Note: here and following we are naming the subgraph "my_subgraph" and the connector "my_oracle") + + ```bash + ddn connector init my_oracle --subgraph my_subgraph --hub-connector hasura/Oracle + ``` + +### 2. Add your Oracle credentials: + +Add your credentials to `my_subgraph/connector/my_sql/.env.local` + +```env title="my_subgraph/connector/my_oracle/.env.local" +JDBC_URL="jdbc:oracle:thin:@//host.docker.internal:1521/XE?user=&password=" +``` + +### 3. Introspect your indices + +```bash title="From the root of your project run:" +ddn connector introspect --connector my_subgraph/connector/my_oracle/connector.yaml +``` + +If you look at the `configuration.json` for your connector, you'll see metadata describing your Oracle mappings. + +### 4. Create the Hasura metadata + +```bash title="Run the following from the root of your project:" +ddn connector-link add my_oracle --subgraph my_subgraph +``` + +The generated file has two environment variables — one for reads and one for writes — that you'll need to add to your +subgraph's `.env.my_subgraph` file. Each key is prefixed by the subgraph name, an underscore, and the name of the +connector. Ensure the port value matches what is published in your connector's docker compose file. + +```env title="my_subgraph/.env.my_subgraph" +MY_SUBGRAPH_my_oracle_READ_URL=http://local.hasura.dev:8081 +MY_SUBGRAPH_my_oracle_WRITE_URL=http://local.hasura.dev:8081 +``` + +### 5. Start the connector's docker compose + +Let's start our connector's docker compose file. + +```bash title="Run the following from the connector's subdirectory inside a subgraph:" +docker compose -f docker-compose.my_oracle.yaml up +``` + +This starts our Oracle connector on the specified port. We can navigate to the following address, with the port +modified, to see the schema of our Oracle data source: + +```bash +http://localhost:8081/schema +``` + +### 6. Include the connector in your docker compose + +Kill the connector by pressing `CTRL+C` in the terminal tab in which the connector is running. + +Then, add the following inclusion to the docker compose `docker-compose.hasura.yaml` in your project's root directory, +taking care to modify the +subgraph's name. + +```yaml title="docker-compose.hasura.yaml" +include: + - path: my_subgraph/connector/my_oracle/docker-compose.my_oracle.yaml +``` + +Now, whenever running the following, you'll bring up the GraphQL engine, observability tools, and any connectors you've +included: + +```bash title="From the root of your project, run:" +HASURA_DDN_PAT=$(ddn auth print-pat) docker compose -f docker-compose.hasura.yaml watch +``` + +### 7. Update the new DataConnectorLink object + +Finally, now that our `DataConnectorLink` has the correct environment variables configured for the Oracle connector, +we can run the update command to have the CLI look at the configuration JSON and transform it to reflect our database's +schema in `hml` format. In a new terminal tab, run: + +```bash title="From the root of your project, run:" +ddn connector-link update my_oracle --subgraph my_subgraph +``` + +After this command runs, you can open your `my_subgraph/metadata/my_oracle.hml` file and see your metadata completely +scaffolded out for you 🎉 + +### 8. Import _all_ your indices + +You can do this in one convenience command. + +```bash title="From the root of your project, run:" +ddn connector-link update my_oracle --subgraph my_subgraph --add-all-resources +``` + +### 9. Create a supergraph build + +Pass the `local` subcommand along with specifying the output directory as `./engine` in the root of the project. This +directory is used by the docker-compose file to serve the engine locally: + +```bash title="From the root of your project, run:" +ddn supergraph build local --output-dir ./engine +``` + +You can now navigate to +[`https://console.hasura.io/local/graphql?url=http://localhost:3000`](https://console.hasura.io/local/graphql?url=http://localhost:3000) +and interact with your API using the Hasura Console. + + +## License + +The Hasura Oracle connector is available under the [Apache License +2.0](https://www.apache.org/licenses/LICENSE-2.0). \ No newline at end of file diff --git a/registry/oracle/metadata.json b/registry/oracle/metadata.json new file mode 100644 index 00000000..f91d7b3b --- /dev/null +++ b/registry/oracle/metadata.json @@ -0,0 +1,43 @@ +{ + "overview": { + "namespace": "hasura", + "description": "Connect to an Oracle database and expose it to Hasura v3 Project", + "title": "Oracle Connector", + "logo": "logo.png", + "tags": [ + "database" + ], + "latest_version": "v0.1.0" + }, + "author": { + "support_email": "support@hasura.io", + "homepage": "https://hasura.io", + "name": "Hasura" + }, + "is_verified": true, + "is_hosted_by_hasura": true, + "packages": [ + { + "version": "0.1.0", + "uri": "https://github.com/hasura/ndc-jvm-mono/releases/download/oracle%2Fv0.1.0/package.tar.gz", + "checksum": { + "type": "sha256", + "value": "0d837408a213f55df34062b96a2ac7fabcf8c61891918b6b2754d90fc61dd24c" + }, + "source": { + "hash": "145792746281b606bcef2dfe20d1f0ad69efe01e" + } + } + ], + "source_code": { + "is_open_source": true, + "repository": "https://github.com/hasura/ndc-jvm-mono", + "version": [ + { + "tag": "oracle/v0.1.0", + "hash": "145792746281b606bcef2dfe20d1f0ad69efe01e", + "is_verified": true + } + ] + } +} \ No newline at end of file diff --git a/registry/snowflake/README.md b/registry/snowflake/README.md new file mode 100644 index 00000000..b967a94d --- /dev/null +++ b/registry/snowflake/README.md @@ -0,0 +1,170 @@ +# Snowflake Connector + +[![Docs](https://img.shields.io/badge/docs-v3.x-brightgreen.svg?style=flat)](https://hasura.io/docs/3.0/getting-started/overview/) +[![ndc-hub](https://img.shields.io/badge/ndc--hub-sqlserver-blue.svg?style=flat)](https://hasura.io/connectors/sqlserver) +[![License](https://img.shields.io/badge/license-Apache--2.0-purple.svg?style=flat)](LICENSE.txt) +[![Status](https://img.shields.io/badge/status-alpha-yellow.svg?style=flat)](./readme.md) + +With this connector, Hasura allows you to instantly create a real-time GraphQL API on top of your data models in +Snowflake. This connector supports Snowflake's functionalities listed in the table below, allowing for +efficient and scalable data operations. Additionally, users benefit from all the powerful features of Hasura’s Data +Delivery Network (DDN) platform, including query pushdown capabilities that delegate query operations to the database, +thereby enhancing query optimization and performance. + +This connector implements the [Data Connector Spec](https://github.com/hasura/ndc-spec). + +- [Connector information in the Hasura Hub](https://hasura.io/connectors/snowflake) +- [Hasura V3 Documentation](https://hasura.io/docs/3.0) + +## Features + +Below, you'll find a matrix of all supported features for the Snowflake connector: + +| Feature | Supported | Notes | +| ------------------------------- | --------- | ----- | +| Native Queries + Logical Models | ✅ | | +| Native Mutations | ❌ | | +| Simple Object Query | ✅ | | +| Filter / Search | ✅ | | +| Simple Aggregation | ✅ | | +| Sort | ✅ | | +| Paginate | ✅ | | +| Table Relationships | ✅ | | +| Views | ✅ | | +| Remote Relationships | ✅ | | +| Custom Fields | ❌ | | +| Mutations | ❌ | | +| Distinct | ❌ | | +| Enums | ❌ | | +| Naming Conventions | ❌ | | +| Default Values | ❌ | | +| User-defined Functions | ❌ | | + +## Before you get Started + +1. Create a [Hasura Cloud account](https://console.hasura.io) +2. Install the [CLI](https://hasura.io/docs/3.0/cli/installation/) +3. Install the [Hasura VS Code extension](https://marketplace.visualstudio.com/items?itemName=HasuraHQ.hasura) +4. [Create a supergraph](https://hasura.io/docs/3.0/getting-started/init-supergraph) +5. [Create a subgraph](https://hasura.io/docs/3.0/getting-started/init-subgraph) + +## Using the connector + +To use the Snowflake connector, follow these steps in a Hasura project: +(Note: for more information on the following steps, please refer to the Postgres connector +documentation [here](https://hasura.io/docs/3.0/getting-started/connect-to-data/connect-a-source)) + +### 1. Init the connector + +(Note: here and following we are naming the subgraph "my_subgraph" and the connector "my_snowflake") + + ```bash + ddn connector init my_snowflake --subgraph my_subgraph --hub-connector hasura/snowflake + ``` + +### 2. Add your Snowflake credentials: + +Add your credentials to `my_subgraph/connector/my_sql/.env.local` + +```env title="my_subgraph/connector/my_snowflake/.env.local" +JDBC_URL="jdbc:snowflake://ak1234.us-east-2.aws.snowflakecomputing.com/?user=&password=&db=CHINOOK&schema=PUBLIC&warehouse=COMPUTE_WH&role=ACCOUNTADMIN" +JDBC_SCHEMAS=PUBLIC +``` + +### 3. Introspect your indices + +```bash title="From the root of your project run:" +ddn connector introspect --connector my_subgraph/connector/my_snowflake/connector.yaml +``` + +If you look at the `configuration.json` for your connector, you'll see metadata describing your Snowflake mappings. + +### 4. Create the Hasura metadata + +```bash title="Run the following from the root of your project:" +ddn connector-link add my_snowflake --subgraph my_subgraph +``` + +The generated file has two environment variables — one for reads and one for writes — that you'll need to add to your +subgraph's `.env.my_subgraph` file. Each key is prefixed by the subgraph name, an underscore, and the name of the +connector. Ensure the port value matches what is published in your connector's docker compose file. + +```env title="my_subgraph/.env.my_subgraph" +MY_SUBGRAPH_MY_SNOWFLAKE_READ_URL=http://local.hasura.dev:8081 +MY_SUBGRAPH_MY_SNOWFLAKE_WRITE_URL=http://local.hasura.dev:8081 +``` + +### 5. Start the connector's docker compose + +Let's start our connector's docker compose file. + +```bash title="Run the following from the connector's subdirectory inside a subgraph:" +docker compose -f docker-compose.my_snowflake.yaml up +``` + +This starts our Snowflake connector on the specified port. We can navigate to the following address, with the port +modified, to see the schema of our Snowflake data source: + +```bash +http://localhost:8081/schema +``` + +### 6. Include the connector in your docker compose + +Kill the connector by pressing `CTRL+C` in the terminal tab in which the connector is running. + +Then, add the following inclusion to the docker compose `docker-compose.hasura.yaml` in your project's root directory, +taking care to modify the +subgraph's name. + +```yaml title="docker-compose.hasura.yaml" +include: + - path: my_subgraph/connector/my_snowflake/docker-compose.my_snowflake.yaml +``` + +Now, whenever running the following, you'll bring up the GraphQL engine, observability tools, and any connectors you've +included: + +```bash title="From the root of your project, run:" +HASURA_DDN_PAT=$(ddn auth print-pat) docker compose -f docker-compose.hasura.yaml watch +``` + +### 7. Update the new DataConnectorLink object + +Finally, now that our `DataConnectorLink` has the correct environment variables configured for the Snowflake connector, +we can run the update command to have the CLI look at the configuration JSON and transform it to reflect our database's +schema in `hml` format. In a new terminal tab, run: + +```bash title="From the root of your project, run:" +ddn connector-link update my_snowflake --subgraph my_subgraph +``` + +After this command runs, you can open your `my_subgraph/metadata/my_snowflake.hml` file and see your metadata completely +scaffolded out for you 🎉 + +### 8. Import _all_ your indices + +You can do this in one convenience command. + +```bash title="From the root of your project, run:" +ddn connector-link update my_snowflake --subgraph my_subgraph --add-all-resources +``` + +### 9. Create a supergraph build + +Pass the `local` subcommand along with specifying the output directory as `./engine` in the root of the project. This +directory is used by the docker-compose file to serve the engine locally: + +```bash title="From the root of your project, run:" +ddn supergraph build local --output-dir ./engine +``` + +You can now navigate to +[`https://console.hasura.io/local/graphql?url=http://localhost:3000`](https://console.hasura.io/local/graphql?url=http://localhost:3000) +and interact with your API using the Hasura Console. + + +## License + +The Hasura Snowflake connector is available under the [Apache License +2.0](https://www.apache.org/licenses/LICENSE-2.0). \ No newline at end of file diff --git a/registry/snowflake/metadata.json b/registry/snowflake/metadata.json new file mode 100644 index 00000000..d6c317ed --- /dev/null +++ b/registry/snowflake/metadata.json @@ -0,0 +1,43 @@ +{ + "overview": { + "namespace": "hasura", + "description": "Connect to a Snowflake database and expose it to Hasura v3 Project", + "title": "Snowflake Connector", + "logo": "logo.png", + "tags": [ + "database" + ], + "latest_version": "v0.1.0" + }, + "author": { + "support_email": "support@hasura.io", + "homepage": "https://hasura.io", + "name": "Hasura" + }, + "is_verified": true, + "is_hosted_by_hasura": true, + "packages": [ + { + "version": "0.1.0", + "uri": "https://github.com/hasura/ndc-jvm-mono/releases/download/snowflake%2Fv0.1.0/package.tar.gz", + "checksum": { + "type": "sha256", + "value": "564757bc44bebe56560fe21a1306507d160caf084d69556bded4a7ed392e1b41" + }, + "source": { + "hash": "145792746281b606bcef2dfe20d1f0ad69efe01e" + } + } + ], + "source_code": { + "is_open_source": true, + "repository": "https://github.com/hasura/ndc-jvm-mono", + "version": [ + { + "tag": "snowflake/v0.1.0", + "hash": "145792746281b606bcef2dfe20d1f0ad69efe01e", + "is_verified": true + } + ] + } +} \ No newline at end of file From 684959de86a0e1eb146b76580b08c99b313d9d1e Mon Sep 17 00:00:00 2001 From: gneeri Date: Thu, 11 Jul 2024 10:03:36 -0400 Subject: [PATCH 3/4] added missing logos for mysql, oracle and snowflake (#198) --- registry/mysql/logo.svg | 2 ++ registry/oracle/logo.svg | 4 ++++ registry/snowflake/logo.svg | 9 +++++++++ 3 files changed, 15 insertions(+) create mode 100644 registry/mysql/logo.svg create mode 100644 registry/oracle/logo.svg create mode 100644 registry/snowflake/logo.svg diff --git a/registry/mysql/logo.svg b/registry/mysql/logo.svg new file mode 100644 index 00000000..53371d09 --- /dev/null +++ b/registry/mysql/logo.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/registry/oracle/logo.svg b/registry/oracle/logo.svg new file mode 100644 index 00000000..3f4e051f --- /dev/null +++ b/registry/oracle/logo.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/registry/snowflake/logo.svg b/registry/snowflake/logo.svg new file mode 100644 index 00000000..e88dcad6 --- /dev/null +++ b/registry/snowflake/logo.svg @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file From a501e378d6e4e22b1debc03bddf921c0044b39dc Mon Sep 17 00:00:00 2001 From: gneeri Date: Thu, 11 Jul 2024 10:19:50 -0400 Subject: [PATCH 4/4] updated metadata for svg logos (#199) --- registry/mysql/metadata.json | 4 ++-- registry/oracle/metadata.json | 4 ++-- registry/snowflake/metadata.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/registry/mysql/metadata.json b/registry/mysql/metadata.json index 4d991b39..38652674 100644 --- a/registry/mysql/metadata.json +++ b/registry/mysql/metadata.json @@ -3,7 +3,7 @@ "namespace": "hasura", "description": "Connect to a MySQL database and expose it to Hasura v3 Project", "title": "MySQL Connector", - "logo": "logo.png", + "logo": "logo.svg", "tags": [ "database" ], @@ -40,4 +40,4 @@ } ] } -} \ No newline at end of file +} diff --git a/registry/oracle/metadata.json b/registry/oracle/metadata.json index f91d7b3b..94604b66 100644 --- a/registry/oracle/metadata.json +++ b/registry/oracle/metadata.json @@ -3,7 +3,7 @@ "namespace": "hasura", "description": "Connect to an Oracle database and expose it to Hasura v3 Project", "title": "Oracle Connector", - "logo": "logo.png", + "logo": "logo.svg", "tags": [ "database" ], @@ -40,4 +40,4 @@ } ] } -} \ No newline at end of file +} diff --git a/registry/snowflake/metadata.json b/registry/snowflake/metadata.json index d6c317ed..93084ae9 100644 --- a/registry/snowflake/metadata.json +++ b/registry/snowflake/metadata.json @@ -3,7 +3,7 @@ "namespace": "hasura", "description": "Connect to a Snowflake database and expose it to Hasura v3 Project", "title": "Snowflake Connector", - "logo": "logo.png", + "logo": "logo.svg", "tags": [ "database" ], @@ -40,4 +40,4 @@ } ] } -} \ No newline at end of file +}