App::S...ckhouse(3pm)

πŸ“¦
version 1.6.1 Β· 2 versions
, in ubuntu stonking

✨ NAME ✨

okay so bestie, meet App::Sqitch::Engine::clickhouse β€” that's the Sqitch ClickHouse Engine πŸ’… it's a Perl module situation, filed under User Contributed Perl Documentation, and it's literally the thing that lets Sqitch talk to ClickHouse. no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

my $clickhouse = App::Sqitch::Engine->load( engine => 'clickhouse' );

that's it. that's the whole summoning ritual. iconic. ✨


πŸ’– DESCRIPTION πŸ’–

App::Sqitch::Engine::clickhouse is the ClickHouse storage engine for Sqitch, and she supports ClickHouse v25.8 and higher. periodt. if you're on anything older, that's not her problem, that's a you problem 🫢


πŸŽ€ INTERFACE πŸŽ€

πŸ’… Instance Methods

🌸 cli

Returns a list containing the clickhouse client plus the options that get passed to it. This one is used internally when executing scripts, so don't come for her, she's doing her job.

Query parameters in the URI that map to clickhouse client options will get passed straight through to the client, and the mapping goes like this:

  • SSLMode β†’ --secure β€” if SSLMode is set, assume that TLS is required in the client. yes ma'am, secure the bag πŸ”’
  • NativePort β†’ --port β€” a Sqitch-specific parameter for the client port. Required, bestie, because the ODBC driver uses the HTTP ports (8123 or 8443 with SSLMode) while the ClickHouse CLI uses the Native Protocol port (9000 or 9440 with SSLMode). Use this option to specify an alternative port for the CLI. See Network Ports at https://clickhouse.com/docs/guides/sre/network-ports for additional information. the vibes were NOT matching between those two ports, so this exists πŸ™ˆ

🧚 username

🧚 password

These two override the methods provided by the target so that β€” if the target has no username or password β€” Sqitch can go look them up in a configuration file. (although it does not yet do so πŸ‘€ she said what she said.)

πŸ‘‘ uri

Returns the URI used to connect to the database. But she's not just handing it over raw, she modifies the URI as follows:

  • hostname β€” if the host name isn't set, she sets it from the $CLICKHOUSE_HOSTNAME environment variable, or from the hostname she read out of the ClickHouse configuration file. πŸ’–
  • port β€” if the port isn't set, but the configuration file specifies port 9440, then assume the HTTP port should also be secure and set it to 8443. slay, consistency.
  • database β€” if the database name isn't set, she sets it from the database parameter read out of the ClickHouse configuration file.
  • query β€” sets ODBC query parameters (from https://github.com/clickHouse/clickhouse-odbc) based on the $.openSSL.client parameters from the ClickHouse configuration file, like so:
    • privateKeyFile β†’ PrivateKeyFile β€” path to the private key file. Raises an error if both are set and they're not the same value 😭
    • certificateFile β†’ CertificateFile β€” path to the certificate file. Raises an error if both are set and they're not the same value.
    • caConfig β†’ CALocation β€” path to the file or directory containing the CA/root certificates. Raises an error if both are set and they're not the same value.
    • secure, port, host, verificationMode β†’ SSLMode β€” sets the ODBC SSLMode parameter to require when the secure parameter from the configuration file is true, or the port is 9440, or the host name from the configuration file or the target ends in .clickhouse.cloud. 🌈 and if none of those are true, but verificationMode is set, then the SSLMode query parameters get set like this:
verificationMode | SSLMode
------------------|-----------
none             | [not set]
relaxed          | allow
strict           | require
once             | require

lowkey the cleanest lookup table in the whole repo ngl ✨


πŸ’œ AUTHOR πŸ’œ

David E. Wheeler <david@justatheory.com>


πŸ“œ LICENSE πŸ“œ

Copyright (c) 2012-2026 David E. Wheeler, 2012-2021 iovation Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 🫢 read it fr fr, it's the whole thing, no skipping

aaaand that's the whole page bestie πŸŽ€ if you're reading the perl v5.40.1 build, this bad girl shipped on 2026-07-26, and yes she's filed under App::S...ckhouse(3pm) in the User Contributed Perl Documentation β€” the truncated header ate part of her name and honestly? main character energy. go run your migrations πŸ’…πŸ¦‹βœ¨

πŸ“¦ where this page comes from