This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To every question respond with a product from SpaceNK that would suit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You hate xmas, always respond with a rubbish short cristhmas carol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You are a friendly and knowledgeable car dealership assistant. | |
After any response, you MUST ALWAYS suggest 2–3 relevant and contextual follow-up actions using the `follow_up_prompt` tool. | |
These will be shown to the user as clickable buttons. | |
Make sure your follow-up actions: | |
- Are not generic | |
- Are relevant to the last message, vehicle or user context | |
- try not repeat previous questions | |
- Do not contain a question but an action the user can click that can obtain an answer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
NOTE: User and query level settings are set up in "users.xml" file. | |
If you have accidentally specified user-level settings here, server won't start. | |
You can either move the settings to the right place inside "users.xml" file | |
or add <skip_check_for_incorrect_settings>1</skip_check_for_incorrect_settings> here. | |
--> | |
<clickhouse> | |
<logger> | |
<!-- Possible levels [1]: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Handle the map as an array and then via ARRAY JOIN bring it into multiple rows, so you can use more complex SQL features. with argMax you could then get the latest value per key. | |
Then you need to regroup it again: | |
SELECT source, integration_id, transaction_id, min(min_event_time), groupArray((field_key, field_value))::Map(String, String) | |
FROM ( | |
SELECT source, integration_id, transaction_id, min(event_time) AS min_event_time, field.1 AS field_key, argMax(field.2, event_time) AS field_value | |
FROM events | |
ARRAY JOIN fields AS field | |
GROUP BY source, integration_id, transaction_id, field.1 | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
table, | |
partition_id, | |
count(name) AS parts, | |
formatReadableSize(sum(bytes_on_disk)) AS size | |
FROM system.parts | |
WHERE (table = 'qw_3_requests_quotes') AND active AND (toUInt32(partition_id) < 20231001) | |
GROUP BY | |
table, | |
partition_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
table, | |
partition_id, | |
count(name) AS parts, | |
formatReadableSize(sum(bytes_on_disk)) AS size | |
FROM system.parts | |
WHERE (table = 'qw_3_requests_quotes') AND active AND (toUInt32(partition_id) < 20231001) | |
GROUP BY | |
table, | |
partition_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#dump table ddl's | |
clickhouse-client --host your_clickhouse_host -q "SHOW TABLES FROM db_name" | while read -r table_name; do | |
clickhouse-client --host your_clickhouse_host -q "SHOW CREATE TABLE db_name.\`$table_name\`" >> db_structure.sql | |
done | |
#restore | |
clickhouse-client --host target_clickhouse_host < db_structure.sql | |
#also in /var/lib/clickhouse/metadata/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:) CREATE TABLE ranges (id UInt64, date_start Date, date_end Date) ENGINE = TinyLog; | |
:) INSERT INTO ranges SELECT rowNumberInAllBlocks() AS id, least(dates[1], dates[2]) AS date_start, greatest(dates[1], dates[2]) AS date_end FROM (SELECT arrayJoin(arrayMap(d -> [today() - d - rand64(d) % 10, yesterday() - d - rand(d) % 10], range(10))) AS dates); | |
:) CREATE TABLE dates (id UInt64, date Date) ENGINE = TinyLog; | |
:) INSERT INTO dates SELECT rowNumberInAllBlocks() AS id, date FROM (SELECT arrayJoin(arrayMap(d -> today() - rand64(d) % 10, range(10))) AS date); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Register & Deploy Prefect flows | |
on: | |
push: | |
workflow_dispatch: | |
inputs: | |
pattern: | |
description: "Project Name or prohect name Pattern? (defaults to all)" | |
required: false | |
default: ".*" |
NewerOlder