clickhouse
A Dagger module to integrate with Clickhousehttps://clickhouse.com
Installation
dagger install github.com/shykes/clickhouse@v0.2.0
Entrypoint
Return Type
Clickhouse !
Arguments
Name | Type | Description |
---|---|---|
host | String ! | Clickhouse hostname |
port | Integer ! | Clickhouse port |
user | String ! | Clickhouse user |
password | Secret ! | Clickhouse password |
Example
dagger -m github.com/shykes/clickhouse@8a8ceca32643776f8e60fbea2122265b8b4fdd41 call \
--host string --port integer --user string --password env:MYSECRET
func (m *myModule) example(host string, port int, user string, password *Secret) *Clickhouse {
return dag.
Clickhouse(host, port, user, password)
}
@function
def example(host: str, port: int, user: str, password: dagger.Secret) -> dag.Clickhouse:
return (
dag.clickhouse(host, port, user, password)
)
@func()
example(host: string, port: number, user: string, password: Secret): Clickhouse {
return dag
.clickhouse(host, port, user, password)
}
Types
Clickhouse 🔗
A clickhouse client configuration
host() 🔗
Return Type
String !
Example
dagger -m github.com/shykes/clickhouse@8a8ceca32643776f8e60fbea2122265b8b4fdd41 call \
--host string --port integer --user string --password env:MYSECRET host
func (m *myModule) example(ctx context.Context, host string, port int, user string, password *Secret) string {
return dag.
Clickhouse(host, port, user, password).
Host(ctx)
}
@function
async def example(host: str, port: int, user: str, password: dagger.Secret) -> str:
return await (
dag.clickhouse(host, port, user, password)
.host()
)
@func()
async example(host: string, port: number, user: string, password: Secret): Promise<string> {
return dag
.clickhouse(host, port, user, password)
.host()
}
port() 🔗
Return Type
Integer !
Example
dagger -m github.com/shykes/clickhouse@8a8ceca32643776f8e60fbea2122265b8b4fdd41 call \
--host string --port integer --user string --password env:MYSECRET port
func (m *myModule) example(ctx context.Context, host string, port int, user string, password *Secret) int {
return dag.
Clickhouse(host, port, user, password).
Port(ctx)
}
@function
async def example(host: str, port: int, user: str, password: dagger.Secret) -> int:
return await (
dag.clickhouse(host, port, user, password)
.port()
)
@func()
async example(host: string, port: number, user: string, password: Secret): Promise<number> {
return dag
.clickhouse(host, port, user, password)
.port()
}
user() 🔗
Return Type
String !
Example
dagger -m github.com/shykes/clickhouse@8a8ceca32643776f8e60fbea2122265b8b4fdd41 call \
--host string --port integer --user string --password env:MYSECRET user
func (m *myModule) example(ctx context.Context, host string, port int, user string, password *Secret) string {
return dag.
Clickhouse(host, port, user, password).
User(ctx)
}
@function
async def example(host: str, port: int, user: str, password: dagger.Secret) -> str:
return await (
dag.clickhouse(host, port, user, password)
.user()
)
@func()
async example(host: string, port: number, user: string, password: Secret): Promise<string> {
return dag
.clickhouse(host, port, user, password)
.user()
}
password() 🔗
Return Type
Secret !
Example
dagger -m github.com/shykes/clickhouse@8a8ceca32643776f8e60fbea2122265b8b4fdd41 call \
--host string --port integer --user string --password env:MYSECRET password
func (m *myModule) example(host string, port int, user string, password *Secret) *Secret {
return dag.
Clickhouse(host, port, user, password).
Password()
}
@function
def example(host: str, port: int, user: str, password: dagger.Secret) -> dagger.Secret:
return (
dag.clickhouse(host, port, user, password)
.password()
)
@func()
example(host: string, port: number, user: string, password: Secret): Secret {
return dag
.clickhouse(host, port, user, password)
.password()
}
container() 🔗
Returns a container that echoes whatever string argument is provided
Return Type
Container !
Example
dagger -m github.com/shykes/clickhouse@8a8ceca32643776f8e60fbea2122265b8b4fdd41 call \
--host string --port integer --user string --password env:MYSECRET container
func (m *myModule) example(host string, port int, user string, password *Secret) *Container {
return dag.
Clickhouse(host, port, user, password).
Container()
}
@function
def example(host: str, port: int, user: str, password: dagger.Secret) -> dagger.Container:
return (
dag.clickhouse(host, port, user, password)
.container()
)
@func()
example(host: string, port: number, user: string, password: Secret): Container {
return dag
.clickhouse(host, port, user, password)
.container()
}
csv() 🔗
Send a SQL query, and return the result as a CSV file
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
query | String ! | - | The SQL query |
Example
dagger -m github.com/shykes/clickhouse@8a8ceca32643776f8e60fbea2122265b8b4fdd41 call \
--host string --port integer --user string --password env:MYSECRET csv --query string
func (m *myModule) example(host string, port int, user string, password *Secret, query string) *File {
return dag.
Clickhouse(host, port, user, password).
Csv(query)
}
@function
def example(host: str, port: int, user: str, password: dagger.Secret, query: str) -> dagger.File:
return (
dag.clickhouse(host, port, user, password)
.csv(query)
)
@func()
example(host: string, port: number, user: string, password: Secret, query: string): File {
return dag
.clickhouse(host, port, user, password)
.csv(query)
}