Skip to content

GovA11y/clickhouse_gdc_v2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clickhouse Data Connector

This repository contains the source code for a data connector agent allow the use of Clickhouse databases as data sources for Hasura v2.

This repository also contains a Dockerfile to be able to build an image in your own architecture.

Status

The project is currently feature complete, but may not be stable. Please report any bugs by filing issues in this repo.

Known issues & limitations

  • Column comparison operators are not supported, but Hasura GraphQL Engine will still allow them, resulting in runtime errors.
  • No support for mutations or subscriptions.
  • Table columns with complex types are supported as JSON strings, not full graphql types.

Using this connector

  1. Deploy the connector somewhere that is accessible to Hasura. See below for instructions on deploying to Hasura Cloud.
  2. Add the agent to your hasura instance.
  3. Add a data source of type "Hasura v2 Clickhouse". You will need to provide the clickhouse database username, password, and url.
  4. Providing aliases: table and column names should be valid GraphQL names. You may provide aliases for any table or column names that are not valid GraphQL names. You do not need to specify all tables or columns.

Deploy to Hasura Cloud

You can use the new Hasura Data Connector Plugin for the Hasura CLI to deploy this connector to Hasura Cloud.

Using environment variables for secrets

Setting username and password in the UI will result in these values being stored in your metadata. This may be undesirable if for example your metadata is being stored in a git repository.

To use environment variables, you can set the following kriti template under advanced settings when configuring your datasource.

{"password":{{$env?[$config.password] ?? $config.password}},"url": {{$env?[$config.url] ?? $config.url}},"username": {{$env?[$config.username] ?? $config.username}},"tables":{{$config?.tables}}}

Then, you can create an environment variable for your password, and set the value of password in the config to the name of that environment variable. If the value of password is not the name of an environment variable, it is used as password instead. The same applies for url and username.

About

Clickhouse Graphql Data Connector for HGE v2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Rust 99.9%
  • Dockerfile 0.1%