Skip to content

Commit

Permalink
clickhouse_info: update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Andersson007 committed Feb 5, 2025
1 parent e8efd0b commit 48789a9
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions plugins/modules/clickhouse_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,12 @@
- name: Query DB using non-default user & DB to connect to
register: result
community.clickhouse.clickhouse_client:
execute: SELECT version()
execute: SELECT * FROM my_table
login_host: localhost
login_user: alice
login_db: foo
login_password: my_password
- name: Print returned server version
ansible.builtin.debug:
var: result.result
- name: Create table
register: result
community.clickhouse.clickhouse_client:
Expand All @@ -76,7 +72,6 @@
flatten_nested: 0
short_circuit_function_evaluation: 'disable'
- name: Insert into test table using named parameters
register: result
community.clickhouse.clickhouse_client:
Expand All @@ -98,7 +93,7 @@
community.clickhouse.clickhouse_client:
execute: "SELECT * FROM test_table_1"
- name: Check return values
- name: Check returned values
ansible.builtin.assert:
that:
- result.result == [["one"], ["two"], ["three"]]
Expand All @@ -109,14 +104,14 @@
description:
- Executed query with substituted arguments if any.
returned: on success
sample: SHOW version()
sample: SELECT * FROM test_table_1
type: str
result:
description:
- Result returned by Client.execute().
returned: on success
type: list
sample: [["23.12.2.59"]]
sample: [["one"], ["two"], ["three"]]
statistics:
description:
- Last executed query statistics retrieved from the
Expand Down

0 comments on commit 48789a9

Please sign in to comment.