8000 GitHub - paulmayer/cdp-cdw-cue
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

paulmayer/cdp-cdw-cue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloudera Data Warehouse with CUE

This repository contains a small proof-of-concept for handling Cloudera Public Cloud virtual warehouse definitions (together with extension configuration) using CUE.

This repo contains the following example cue schema:

package root

import (
	"github.com/paulmayer/cdp-cdw-cue/api:v0_9_131"
    ext "github.com/paulmayer/cdp-cdw-cue/extensions"
)

#VirtualWarehouse: {
	apiVersion: "v1alpha"
	kind:       "VirtualWarehouse"
    n=name!:      string

	spec: v0_9_131.#CreateVwRequest & {
        name: n
    }

	extensions: [...ext.#Extension]
}

where the CreateVwRequest schema is directly taken from CDP API docs and extension definitions are managed in the present cue module.

How to use

The repository contains a Makefile which retrieves data warehouse API docs from CDP API docs, converting swagger definitions to OAPI 3.0 and subsequently importing them to cue.

Run

make all

to import the relevant cue schema and vet the example minimal vw definition in examples/example.yaml:

cue vet examples/example.yaml examples/root.cue -d "#VirtualWarehouse"

To export the virtual warehouse definition in yaml, run:

cue export examples/example.yaml examples/root.cue -d "#VirtualWarehouse" --out yaml

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0